File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -315,8 +315,8 @@ int Context::time() {
315315 return ti_->time ();
316316}
317317
318- int Context::timeshift (int year, int month) {
319- return ti_->timeshift (year, month);
318+ int Context::CalcTimeDiff (int year, int month) {
319+ return ti_->CalcTimeDiff (year, month);
320320}
321321
322322int Context::random () {
Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ class Context {
253253 virtual int time ();
254254
255255 // / Returns a time shift between the simulation start time and another time stamp
256- int timeshift (int year, int month);
256+ int CalcTimeDiff (int year, int month);
257257
258258 // / Adds a package type to a simulation-wide accessible list.
259259 // / Agents should NOT add their own packages.
Original file line number Diff line number Diff line change @@ -281,18 +281,18 @@ int Timer::dur() {
281281 return si_.duration ;
282282}
283283
284- int Timer::timeshift (int year, int month) {
284+ int Timer::CalcTimeDiff (int year, int month) {
285285
286- int timeshift_ = 0 ;
286+ int timediff_ = 0 ;
287287 if (year >= 0 ) {
288- timeshift_ += (year - si_.y0 ) * kMonthsPerYear ;
288+ timediff_ += (year - si_.y0 ) * kMonthsPerYear ;
289289 }
290290
291291 if (month >= 0 ) {
292- timeshift_ += si_.m0 - month;
292+ timediff_ += si_.m0 - month;
293293 }
294294
295- return timeshift_ ;
295+ return timediff_ ;
296296
297297}
298298
Original file line number Diff line number Diff line change @@ -75,9 +75,9 @@ class Timer {
7575 // / @param year of alternate time stamp
7676 // / @param month of alternate time stamp
7777 // /
78- // / @return the timeshift between two times, in months
78+ // / @return the difference between the simulation start time and another time
7979 // / @warning Only valid for times that occur after the simulation start time.
80- int timeshift (int year, int month);
80+ int CalcTimeDiff (int year, int month);
8181
8282 private:
8383 // / builds all agents queued for the current timestep.
You can’t perform that action at this time.
0 commit comments