pwu::Time

Utility functions for time, which is represented as the number of seconds since epoch.

Summary
pwu::TimeUtility functions for time, which is represented as the number of seconds since epoch.
Static Actions
nowReturn a time set the current time
setReturn a time set the to given number of seconds
doubleReturn the number of fractional seconds since epoch
equalCheck if the given times are equal
notEqualCheck if the given times are not equal
greaterThanCheck if the first time is greater than the second time
lessThanCheck if the first time is less than the second time
addAdd two times together
subtractSubtract the second time from the first time
elapsedGet the number of fractional seconds that have passed since the given time

Static Actions

now

pwu::Time now

Return a time set the current time

Parameters

none

Returns

a time

set

pwu::Time set < real_secs | int_secs int usecs >

Return a time set the to given number of seconds

Parameters

realSecsa real value of the number of fractional seconds since epoch; if none given the current time is used
intSecsan int value of the number of seconds since epoch
intUsecsan int value of the number of microseconds in the fractional second

Returns

a time

double

pwu::Time double time

Return the number of fractional seconds since epoch

Parameters

timethe time

Returns

a double value of seconds

equal

pwu::Time equal time1 time2

Check if the given times are equal

Parameters

time1the first time
time2the second time

Returns

true if the times are equal

notEqual

pwu::Time notEquals time1 time2

Check if the given times are not equal

Parameters

time1the first time
time2the second time

Returns

true if the times are not equal

greaterThan

pwu::Time greaterThan time1 time2

Check if the first time is greater than the second time

Parameters

time1the first time
time2the second time

Returns

true if the first is greater than the second

lessThan

pwu::Time lessThan time1 time2

Check if the first time is less than the second time

Parameters

time1the first time
time2the second time

Returns

true if the first is less than the second

add

pwu::Time add time1 time2

Add two times together

Parameters

time1the first time
time2the second time

Returns

the sum of the times

subtract

pwu::Time subtract time1 time2

Subtract the second time from the first time

Parameters

time1the first time
time2the second time

Returns

the difference of the times

elapsed

pwu::Time elapsed time

Get the number of fractional seconds that have passed since the given time

Parameters

timethe time

Returns

the number of seconds elapsed

pwu::Time now
Return a time set the current time
pwu::Time set < real_secs | int_secs int usecs >
Return a time set the to given number of seconds
pwu::Time double time
Return the number of fractional seconds since epoch
pwu::Time equal time1 time2
Check if the given times are equal
pwu::Time notEquals time1 time2
Check if the given times are not equal
pwu::Time greaterThan time1 time2
Check if the first time is greater than the second time
pwu::Time lessThan time1 time2
Check if the first time is less than the second time
pwu::Time add time1 time2
Add two times together
pwu::Time subtract time1 time2
Subtract the second time from the first time
pwu::Time elapsed time
Get the number of fractional seconds that have passed since the given time
Close