Lolly 1.4.27
Loading...
Searching...
No Matches
tm_timer.cpp
Go to the documentation of this file.
1
2/******************************************************************************
3 * MODULE : timer.cpp
4 * DESCRIPTION: timers
5 * COPYRIGHT : (C) 1999 Joris van der Hoeven
6 *******************************************************************************
7 * This software falls under the GNU general public license version 3 or later.
8 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
9 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
10 ******************************************************************************/
11
12#include "tm_timer.hpp"
13#include "basic.hpp"
14#include "iterator.hpp"
15#include "merge_sort.hpp"
16#include "tm_ostream.hpp"
17
18#include "tbox/tbox.h"
19
20/******************************************************************************
21 * Getting the time
22 ******************************************************************************/
25 tb_timeval_t tp= {0};
27 return (time_t) tp.tv_sec;
28}
29
32 tb_timeval_t tp= {0};
34 return (time_t) tp.tv_usec;
35}
36
39 tb_timeval_t tp= {0};
41 return (time_t) ((tp.tv_sec * 1000) + (tp.tv_usec / 1000));
42}
43
45
48 tb_timeval_t tp= {0};
50 return ((time_t) ((tp.tv_sec * 1000) + (tp.tv_usec / 1000))) - start_time;
51}
The list class represents a linked list.
Definition list.hpp:48
time_t get_usec_time()
Definition tm_timer.cpp:31
time_t texmacs_time()
Definition tm_timer.cpp:47
time_t raw_time()
Definition tm_timer.cpp:38
static time_t start_time
Definition tm_timer.cpp:44
time_t get_sec_time()
Definition tm_timer.cpp:24