GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — SETSM/log.hpp at master · setsmdeveloper/SETSM Expand file tree/ Copy pathlog.hppMore file actions 51 lines (42 loc) · 1.29 KB / Copy pathlog.hppFile metadata and controls51 lines (42 loc) · 1.29 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 #ifndef LOG_H #define LOG_H #include<chrono> class StopWatch { public: void start() { if(is_running) stop(); start_time = std::chrono::high_resolution_clock::now(); is_running = true; } void stop() { auto stop_time = std::chrono::high_resolution_clock::now(); duration = stop_time - start_time; is_running = false; } std::chrono::high_resolution_clock::duration get_elapsed_time() { return duration; } long get_elapsed_seconds() { return std::chrono::duration_cast<std::chrono::seconds>(duration).count(); } long get_elapsed_milliseconds() { return std::chrono::duration_cast<std::chrono::milliseconds>(duration).count(); } long get_elapsed_microseconds() { return std::chrono::duration_cast<std::chrono::microseconds>(duration).count(); } private: std::chrono::high_resolution_clock::time_point start_time; std::chrono::high_resolution_clock::duration duration; bool is_running; }; int init_logging(); void LOG(const char *fmt, ...); #endif struct SINGLE_FILE; SINGLE_FILE *single_fopen(const char *path, const char *mode); int fclose(SINGLE_FILE *stream); int fprintf(SINGLE_FILE *stream, const char *format, ...); int single_printf(const char *fmt, ...); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |