Statistics
| Branch: | Revision:

janus-gateway / utils.c @ 5e9e29e0

History | View | Annotate | Download (499 Bytes)

1
/*! \file    utils.c
2
 * \author   Lorenzo Miniero <lorenzo@meetecho.com>
3
 * \copyright GNU Affero General Public License v3
4
 * \brief    Utilities and helpers
5
 * \details  Implementations of a few methods that may be of use here
6
 * and there in the code.
7
 * 
8
 * \ingroup core
9
 * \ref core
10
 */
11

    
12
#include "utils.h"
13

    
14
gint64 janus_get_monotonic_time() {
15
        struct timespec ts;
16
        clock_gettime (CLOCK_MONOTONIC, &ts);
17
        return (ts.tv_sec*G_GINT64_CONSTANT(1000000)) + (ts.tv_nsec/G_GINT64_CONSTANT(1000));
18
}