diff options
| author | Paul Buetow (mars.fritz.box) <paul@buetow.org> | 2013-12-15 11:49:02 +0100 |
|---|---|---|
| committer | Paul Buetow (mars.fritz.box) <paul@buetow.org> | 2013-12-15 11:49:02 +0100 |
| commit | 3a96ab7e91145b367d05e98533b5f426f762f83f (patch) | |
| tree | ac7758a706066e14b785ab6e5f7071a54baa856b /yhttpd/src/time/timr.h | |
| parent | 332d7b2107833018b3ef67b64ffe121bff1ef4fb (diff) | |
add packagespackages
Diffstat (limited to 'yhttpd/src/time/timr.h')
| -rw-r--r-- | yhttpd/src/time/timr.h | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/yhttpd/src/time/timr.h b/yhttpd/src/time/timr.h deleted file mode 100644 index 12cdd8f..0000000 --- a/yhttpd/src/time/timr.h +++ /dev/null @@ -1,64 +0,0 @@ -#include "../incl.h" - -#ifndef TIMR_H -#define TIMR_H - -#include "../thrd/thro.h" - -#include <unistd.h> - -using namespace std; - -class timr : public thro -{ -private: - bool b_timer_active; - int i_time_offset; - string s_uptime; - string s_time; - - pthread_mutex_t mut_s_time; - pthread_mutex_t mut_s_uptime; - pthread_mutex_t mut_i_offset; - -public: - timr(); - ~timr(); - - bool get_timer_active() const; - void start( void *v_ptr ); - -#ifdef NCURSES - - void print_time(); -#endif - - void set_time( double d_uptime, int i_cur_seconds, int i_cur_minutes, int i_cur_hours ); - string add_zero_to_front( string s_time ); - - // inline for dynamic module access! - string - get_time( ) - { - string s_ret; - pthread_mutex_lock ( &mut_s_time ); - s_ret = this->s_time; - pthread_mutex_unlock( &mut_s_time ); - return s_ret; - } - - string - get_uptime( ) - { - string s_ret; - pthread_mutex_lock ( &mut_s_uptime ); - s_ret = this->s_uptime; - pthread_mutex_unlock( &mut_s_uptime ); - return s_ret; - } - - int get_offset(); - double get_time_diff( time_t &clock_diff ); -}; - -#endif |
