00001 #ifndef _WINC_TIMER 00002 #define _WINC_TIMER 00003 00004 #include <sys/time.h> 00005 00006 namespace WXP { 00007 class Timer { 00008 struct timeval start; /* Stores time when image placed in window */ 00009 struct timeval current; /* Stores current time */ 00010 struct timeval event_time; /* Stores last time an event occurred */ 00011 00012 float elapse; 00013 00014 public: 00015 Timer(); 00016 int init(); 00017 float elapsed(); 00018 float sleep( float secs ); 00019 }; 00020 } 00021 #endif
1.6.1