summaryrefslogblamecommitdiff
path: root/src/common/timer.hpp
blob: b9c95888d1fd2c95525626d5ff54f2adc3972f36 (plain) (tree)
1
2
3
4
5
6
7
8
9

                 
 

                       
                      
 

                       





                                                      
 

                         
 

                                                                 
                                 
 
                                                                        
                                   
 
                   
#ifndef TIMER_HPP
#define TIMER_HPP

# include "timer.t.hpp"

# include "sanity.hpp"

# include "strings.hpp"

// updated automatically when using milli_clock::now()
// which is done only by core.cpp
extern tick_t gettick_cache;

inline
tick_t gettick(void)
{
    return gettick_cache;
}

/// Do all timers scheduled before tick, and return the number of
/// milliseconds until the next timer happens
interval_t do_timer(tick_t tick);

/// Stat a file, and return its modification time, truncated to seconds.
tick_t file_modified(ZString name);

#endif // TIMER_HPP