TimeSpan
TimeSpan

Represents a range of time

Functions
TimeSpan
explicit TimeSpan(
uint64 nanoseconds
)

Creates a TimeSpan given the nanoseconds value.  This constructor is private to force use of the static constructor methods to create a timespan.

Parameters
nanoseconds
uint64

The number of nanoseconds to create the TimeSpan with.

Variables
m_nanoseconds
uint64 m_nanoseconds

The number of nanoseconds in the timespan

Functions
compare
int64 compare(
const TimeSpan &other
) const

Gets the difference (in nanoseconds) of the two TimeSpans.

Parameters
other
const TimeSpan&

The other TimeSpan to compare.

Returns

The difference in nanoseconds of the two TimeSpans.

getNanoseconds
uint64 getNanoseconds() const

Gets the nanoseconds resolution of the TimeSpan

Returns

The TimeSpan in nanoseconds resolution

getMicroseconds
uint64 getMicroseconds() const

Gets the microsecond resolution of the TimeSpan

Returns

The TimeSpan in microsecond resolution

getMilliseconds
uint64 getMilliseconds() const

Gets the millisecond resolution of the TimeSpan

Returns

The TimeSpan in milliseconds resolution

getSeconds
uint64 getSeconds() const

Gets the seconds resolution of the TimeSpan

Returns

The TimeSpan in seconds resolution

NanoSeconds
static TimeSpan NanoSeconds(
uint64 nanoseconds
)

Creates a TimeSpan object from nanoseconds

Parameters
nanoseconds
uint64

The number of nanoseconds for the timespan

Returns

A TimeSpan object representative of the passed in value

MicroSeconds
static TimeSpan MicroSeconds(
uint64 microseconds
)

Creates a TimeSpan object from microseconds

Parameters
microseconds
uint64

The number of microseconds for the timespan

Returns

A TimeSpan object representative of the passed in value

MilliSeconds
static TimeSpan MilliSeconds(
uint64 milliseconds
)

Creates a TimeSpan object from milliseconds

Parameters
milliseconds
uint64

The number of milliseconds for the timespan

Returns

A TimeSpan object representative of the passed in value

Seconds
static TimeSpan Seconds(
uint64 seconds
)

Creates a TimeSpan object from seconds

Parameters
seconds
uint64

The number of seconds for the timespan

Returns

A TimeSpan object representative of the passed in value

Minutes
static TimeSpan Minutes(
int minutes
)

Creates a TimeSpan object from minutes

Parameters
minutes
int

The number of minutes for the timespan

Returns

A TimeSpan object representative of the passed in value

Hours
static TimeSpan Hours(
int hours
)

Creates a TimeSpan object from hours

Parameters
hours
int

The number of hours for the timespan

Returns

A TimeSpan object representative of the passed in value

Days
static TimeSpan Days(
int days
)

Creates a TimeSpan object from days

Parameters
days
int

The number of days for the timespan

Returns

A TimeSpan object representative of the passed in value