libvisual  0.5.0
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
LV::Time Class Reference

Encodes time. More...

#include <libvisual/lv_time.h>

Public Member Functions

 Time (long sec_=0, long nsec_=0)
 
Timeoperator-= (Time const &rhs)
 
double to_secs () const
 Converts the time to seconds.
 
uint64_t to_msecs () const
 Converts the time to milliseconds.
 
uint64_t to_usecs () const
 Converts the time to microseconds.
 

Static Public Member Functions

static Time from_secs (double secs)
 
static Time from_msecs (uint64_t msecs)
 
static Time from_usecs (uint64_t usecs)
 
static Time now ()
 
static void usleep (uint64_t usecs)
 Sleeps for a period of time. This will yield the calling thread.
 

Public Attributes

long sec
 seconds
 
long nsec
 nanoseconds
 

Friends

Time operator- (Time const &lhs, Time const &rhs)
 
bool operator== (Time const &lhs, Time const &rhs)
 
bool operator!= (Time const &lhs, Time const &rhs)
 
bool operator>= (Time const &lhs, Time const &rhs)
 
bool operator<= (Time const &lhs, Time const &rhs)
 
bool operator> (Time const &lhs, Time const &rhs)
 
bool operator< (Time const &lhs, Time const &rhs)
 

Detailed Description

Encodes time.

Definition at line 50 of file lv_time.h.


The documentation for this class was generated from the following files: