aboutsummaryrefslogtreecommitdiff
path: root/src/scenarios.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/scenarios.cc')
-rw-r--r--src/scenarios.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scenarios.cc b/src/scenarios.cc
index 140696c..90a7849 100644
--- a/src/scenarios.cc
+++ b/src/scenarios.cc
@@ -29,7 +29,7 @@ int main(int argc, char **argv){
int seed=atoi(argv[1]);
double simtime=stod(argv[2]);
unsigned int wakeupevery=atoi(argv[3]);
- double wakeupfor=stod(argv[4]);
+ unsigned int wakeupfor=stoi(argv[4]);
unsigned int n_nodes=atoi(argv[5]);
bool extended=!strcmp("true",argv[6]);
bool hint=!strcmp("true",argv[7]);
@@ -74,7 +74,7 @@ int main(int argc, char **argv){
Value ts(kArrayType);
Value duration(kArrayType);
for(unsigned int i=0;i<simtime;i+=wakeupevery){
- ts.PushBack(Value().SetDouble(RAND(i,i+wakeupevery)),d.GetAllocator());
+ ts.PushBack(Value().SetDouble(RAND(i,i+wakeupevery-wakeupfor)),d.GetAllocator());
duration.PushBack(Value().SetDouble(wakeupfor),d.GetAllocator());
}
node.AddMember("wake_ts",ts,d.GetAllocator());