nn::fnd::TimeSpan Class

Syntax

class TimeSpan

Description

Represents the length of time.

Within this class, time is expressed in nanoseconds using 64-bit integers. This class is used to prevent unit mistakes in the values that are passed to functions that specify time within the SDK. The From* functions allow you to create instances of this class from integer values of the various units. In order to prevent ambiguity in units, no implicit conversion from integers to this data type is provided. However, 0 can be converted implicitly to this data type.

Member Functions

Constructor
TimeSpan Constructor that initializes the time to 0.
S FromNanoSeconds Generates a TimeSpan object from a nanoseconds value.
S FromMicroSeconds Generates a TimeSpan object from a microseconds value.
S FromMilliSeconds Generates a TimeSpan object from a milliseconds value.
S FromSeconds Generates a TimeSpan object from a seconds value.
S FromMinutes Generates a TimeSpan object from a minutes value.
S FromHours Generates a TimeSpan object from an hours value.
S FromDays Generates a TimeSpan object from a days value.
Gets the value in specific units
GetDays Gets the time in days.
GetHours Gets the time in hours.
GetMinutes Gets the time in minutes.
GetSeconds Gets the time in seconds.
GetMilliSeconds Gets the time in milliseconds.
GetMicroSeconds Gets the time in microseconds.
GetNanoSeconds Gets the time in nanoseconds.
Other
operator+= Adds the length of time.
operator-= Subtracts the length of time.

Friend functions

operator== Determines whether the lengths of time match.
operator!= Determines whether the lengths of time do not match.
operator< Determines if the length of time is shorter.
operator> Determines if the length of time is longer.
operator<= Determines if the length of time is shorter or equal.
operator>= Determines if the length of time is longer or equal.
operator+ Finds the sum of lengths of time.
operator- Finds the difference in lengths of time.

Revision History

2012/05/25
Categorized the member functions.
Added the operator-series functions.
2010/01/07
Initial version.

CONFIDENTIAL