Skip to content

Commit

Permalink
antara scheduler fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
antara-chugh committed Aug 5, 2024
1 parent 98aca1f commit 059d590
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@
"cmake.generator": "Unix Makefiles",
"cmake.sourceDirectory": "${workspaceFolder}",
"cmake.buildDirectory": "${workspaceFolder}/build",

"cmake.debugConfig": {
"cwd": "${workspaceFolder}"
},
"cmake.configureArgs": [
"-DTEST=ON",
"-DCMAKE_BUILD_TYPE=Debug"
Expand Down
5 changes: 3 additions & 2 deletions src/antara_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Scheduler::Scheduler(DeploymentSchedule_t schedule[], int numTasks)
}
else
{
tasks[i].startDelay = tasks[i - 1].startDelay + tasks[i - 1].maxDuration;
tasks[i].nextRunTime=tasks[i - 1].nextRunTime + tasks[i - 1].maxDuration;
std::cout<<tasks[i].nextRunTime<< std::endl;
}
}
}
Expand All @@ -40,7 +41,7 @@ int Scheduler::getNextTask(DeploymentSchedule_t **p_next_task, std::uint32_t *p_
for(; i>=0; i--)
{
bool canSet = true;
int runTime = tasks[i].nextRunTime;
std::uint32_t runTime = tasks[i].nextRunTime;
int delay = current_time - runTime;
if (delay > 0)
{
Expand Down

0 comments on commit 059d590

Please sign in to comment.