Debian Codegraph @

prboom2/src/dsda/time.h

raw
1 //
2 // Copyright(C) 2020 by Ryan Krafnick
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // DESCRIPTION:
15 // DSDA Time
16 //
17
18 #ifndef __DSDA_TIME__
19 #define __DSDA_TIME__
20
21 typedef enum {
22 dsda_timer_realtime,
23 dsda_timer_fps,
24 dsda_timer_key_frame,
25 dsda_timer_brute_force,
26 dsda_timer_render_stats,
27 dsda_timer_temp,
28 DSDA_TIMER_COUNT
29 } dsda_timer_t;
30
31 extern int (*dsda_GetTick)(void);
32 extern unsigned long long (*dsda_TickElapsedTime)(void);
33
34 void dsda_StartTimer(int timer);
35 unsigned long long dsda_ElapsedTime(int timer);
36 unsigned long long dsda_ElapsedTimeMS(int timer);
37 void dsda_PrintElapsedTime(int timer, const char* message);
38 void dsda_LimitFPS(void);
39 int dsda_GetTickRealTime(void);
40 void dsda_ResetTimeFunctions(int fastdemo);
41
42 #endif