Time represents a wall clock time. More...
Public Member Functions |
|
Time (int s, int us) | |
Construct a Time from a number of seconds and microseconds. |
|
Time (timeval t) | |
Construct a Time from a timeval. |
|
Time (struct timespec t) | |
Construct a Time from a struct timespec. |
|
int | s () const |
The number of seconds since the epoch. |
|
int | us () const |
The number of microseconds since the last second. |
|
Arithmetic
|
|
Time | operator+ (int usecs) const |
Time | operator+= (int usecs) |
Time | operator- (int usecs) const |
Time | operator-= (int usecs) |
int | operator- (const Time &other) const |
Comparison
|
|
bool | operator< (const Time &other) const |
bool | operator> (const Time &other) const |
bool | operator>= (const Time &other) const |
bool | operator<= (const Time &other) const |
bool | operator== (const Time &other) const |
bool | operator!= (const Time &other) const |
Casting
|
|
Time can be cast to a timeval or struct timespec for use in syscalls. |
|
operator timeval () | |
operator struct timespec () | |
Static Public Member Functions |
|
static Time | now () |
The current time. |
|
static Time | monotonic () |
The time since boot. |
Time represents a wall clock time.
Not to be used for representing a duration of time. Two times can be subtracted to return the difference between them in microseconds. A number of microseconds can be added to or subtracted from time to return a new time. Times also support all the comparison operators.
Copyright (c) 2012, Nokia Corporation and/or its subsidiary(-ies). All rights reserved. See Copyright. |
MeeGo 1.2 Harmattan API
|