feisty meow concerns codebase  2.140
timely::time_control Class Reference

Provides some functions that affect time, or ones perception of time. More...

#include <time_control.h>

Inheritance diagram for timely::time_control:
Collaboration diagram for timely::time_control:

Public Member Functions

 ~time_control ()
 
bool set_time (const time_locus &new_time)
 makes the current time equal to "new_time". More...
 
- Public Member Functions inherited from basis::nameable
virtual const char * class_name () const =0
 Returns the bare name of this class as a constant character pointer. More...
 

Static Public Member Functions

static void sleep_ms (basis::un_int msec)
 a system independent name for a forced snooze measured in milliseconds. More...
 

Detailed Description

Provides some functions that affect time, or ones perception of time.

Definition at line 28 of file time_control.h.

Constructor & Destructor Documentation

◆ ~time_control()

timely::time_control::~time_control ( )
inline

Definition at line 31 of file time_control.h.

Member Function Documentation

◆ set_time()

bool timely::time_control::set_time ( const time_locus new_time)

makes the current time equal to "new_time".

This will only work if the operation is supported on this OS and if the current user has the proper privileges.

Definition at line 40 of file time_control.cpp.

References timely::day_in_year::day_of_week, timely::day_in_year::day_of_year, timely::clock_time::hour, timely::clock_time::minute, timely::day_in_year::month, timely::clock_time::second, and timely::time_locus::year.

◆ sleep_ms()

void timely::time_control::sleep_ms ( basis::un_int  msec)
static

a system independent name for a forced snooze measured in milliseconds.

the application will do nothing on the current thread for the amount of time specified. on some systems, if "msec" is zero, then the sleep will yield the current thread's remaining timeslice back to other threads.

Definition at line 30 of file time_control.cpp.

Referenced by timely::timer_driver::~timer_driver().


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