Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

system_beos.cpp

Go to the documentation of this file.
00001 /*
00002         $Id: system_beos.cpp,v 1.1 2000/07/18 17:04:27 sphair Exp $
00003 
00004         ------------------------------------------------------------------------
00005         ClanLib, the platform independent game SDK.
00006 
00007         This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00008         version 2. See COPYING for details.
00009 
00010         For a total list of contributers see CREDITS.
00011 
00012         ------------------------------------------------------------------------
00013 
00014         File purpose:
00015                 main. Initialization of the BeOS version of ClanLib.
00016 
00017 */
00018 
00019 #include "API/Core/System/system.h"
00020 #include <OS.h>
00021 
00022 int suspended_time = 0; 
00023 bool time_running = true;
00024 int start_pause;
00025 
00026 // int CL_System::suspend_time = 0; 
00027 // bool CL_System::time_running = true;
00028 // int CL_System::start_pause;
00029 
00030 void CL_System::suspend_time()
00031 {
00032         if (time_running)
00033         {
00034                 time_running = false;
00035                 start_pause = get_time();
00036         }
00037 }
00038 
00039 void CL_System::resume_time()
00040 {
00041         if (!time_running)
00042         {
00043                 time_running = true;
00044                 suspended_time += get_time() - start_pause;
00045         }
00046 }
00047 
00048 unsigned int CL_System::get_time()
00049 {
00050         return (system_time() / 1000) - suspended_time;
00051 }
00052 
00053 void CL_System::sleep(int millis)
00054 {
00055         snooze(millis*1000);
00056 }

Generated at Wed Apr 4 19:54:04 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001