31 #ifndef TBX_MONTONICTIME_H_
32 #define TBX_MONTONICTIME_H_
48 _swix(OS_ReadMonotonicTime, _OUT(0), &mt);
61 if (to >= from)
return to - from;
62 return to + (0xFFFFFFFF ^ from) + 1;
75 if (compare < to)
return true;
76 return (compare - to) > 0x7FFFFFFF;
89 if (compare <= to)
return true;
90 return (compare - to) > 0x7FFFFFFF;
103 if (compare <= to)
return false;
104 return (compare - to) <= 0x7FFFFFFF;
117 if (compare < to)
return false;
118 if (compare == to)
return true;
119 return (compare - to) <= 0x7FFFFFFF;
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
bool monotonic_ge(unsigned int compare, unsigned int to)
Compare if one time is greater than or equal to another taking into account wrap around.
Definition: monotonictime.h:115
bool monotonic_le(unsigned int compare, unsigned int to)
Compare if one time is less than or equals to another taking into account wrap around.
Definition: monotonictime.h:87
bool monotonic_gt(unsigned int compare, unsigned int to)
Compare if one time is greater than another taking into account wrap around.
Definition: monotonictime.h:101
bool monotonic_lt(unsigned int compare, unsigned int to)
Compare if one time is less than another taking into account wrap around.
Definition: monotonictime.h:73
unsigned int monotonic_elapsed(unsigned int from, unsigned int to)
Return the elapsed time taking into account the wrap around for unsigned integers.
Definition: monotonictime.h:59
unsigned int monotonic_time()
Read the time in centiseconds since the system was last reset.
Definition: monotonictime.h:45