first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / core / library / timely / time_control.h
1 #ifndef TIME_CONTROL_CLASS
2 #define TIME_CONTROL_CLASS
3
4 /*****************************************************************************\
5 *                                                                             *
6 *  Name   : time_control
7 *  Author : Chris Koeritz
8 *                                                                             *
9 *******************************************************************************
10 * Copyright (c) 1995-$now By Author.  This program is free software; you can  *
11 * redistribute it and/or modify it under the terms of the GNU General Public  *
12 * License as published by the Free Software Foundation; either version 2 of   *
13 * the License or (at your option) any later version.  This is online at:      *
14 *     http://www.fsf.org/copyleft/gpl.html                                    *
15 * Please send any updates to: fred@gruntose.com                               *
16 \*****************************************************************************/
17
18 #include "earth_time.h"
19
20 ///#include <basis/astring.h>
21 ///#include <basis/contracts.h>
22 ///#include <basis/definitions.h>
23
24 namespace timely {
25
26 //! Provides some functions that affect time, or ones perception of time.
27
28 class time_control : public virtual basis::nameable
29 {
30 public:
31   ~time_control() {}
32
33   static void sleep_ms(basis::un_int msec);
34     //!< a system independent name for a forced snooze measured in milliseconds.
35     /*!< the application will do nothing on the current thread for the amount of
36     time specified.  on some systems, if "msec" is zero, then the sleep will
37     yield the current thread's remaining timeslice back to other threads. */
38
39   bool set_time(const time_locus &new_time);
40     //!< makes the current time equal to "new_time".
41     /*!< This will only work if the operation is supported on this OS and if
42     the current user has the proper privileges. */
43 };
44
45 } //namespace.
46
47 #endif
48