Lolly 1.4.28
Loading...
Searching...
No Matches
Functions | Variables
tm_timer.cpp File Reference
#include "tm_timer.hpp"
#include "basic.hpp"
#include "iterator.hpp"
#include "merge_sort.hpp"
#include "tm_ostream.hpp"
#include "tbox/tbox.h"
Include dependency graph for tm_timer.cpp:

Go to the source code of this file.

Functions

time_t get_sec_time ()
 
time_t get_usec_time ()
 
time_t raw_time ()
 
time_t texmacs_time ()
 

Variables

static time_t start_time = raw_time ()
 

Function Documentation

◆ get_sec_time()

time_t get_sec_time ( )

Definition at line 24 of file tm_timer.cpp.

24 {
25 tb_timeval_t tp= {0};
27 return (time_t) tp.tv_sec;
28}
The list class represents a linked list.
Definition list.hpp:48

◆ get_usec_time()

time_t get_usec_time ( )

Definition at line 31 of file tm_timer.cpp.

31 {
32 tb_timeval_t tp= {0};
34 return (time_t) tp.tv_usec;
35}

◆ raw_time()

time_t raw_time ( )

Definition at line 38 of file tm_timer.cpp.

38 {
39 tb_timeval_t tp= {0};
41 return (time_t) ((tp.tv_sec * 1000) + (tp.tv_usec / 1000));
42}

◆ texmacs_time()

time_t texmacs_time ( )

Definition at line 47 of file tm_timer.cpp.

47 {
48 tb_timeval_t tp= {0};
50 return ((time_t) ((tp.tv_sec * 1000) + (tp.tv_usec / 1000))) - start_time;
51}
static time_t start_time
Definition tm_timer.cpp:44

Variable Documentation

◆ start_time

time_t start_time = raw_time ()
static

Definition at line 44 of file tm_timer.cpp.