aboutsummaryrefslogtreecommitdiff
path: root/assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md
blob: b5149e7b6740ffc2ffbb06c774fcca60c4cded4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
titles:
- rwt_last_rpt
- rwt_next_rpt
- rwt_time_from_last_rpt
- rwt_time_to_next_rpt
section: 3advtrains
manual: 'Advtrains Developer''s Manual'
shortdesc: calculate time for repeating events
---

# Synopsis

* `last_rpt(time, interval, offset)`
* `next_rpt(time, interval, offset)`
* `time_from_last_rpt(interval, offset)`
* `time_to_next_rpt(interval, offset)`

# Description
The functions described in this page calculates the time or time difference related to events scheduled to repeat with the given interval and at the given offset, in relation to the given time. Whether and when the event actually takes place is not relevant to the API.

* `last_rpt()` returns the time at which the event was expected to occur the last time
* `next_rpt()` returns the time at which the event is expected to occur the next time
* `time_from_last_rpt()` returns the time since the event was expected to occur the last time
* `time_to_next_rpt()` return the time until the event is expected to occur the next time