Valkka  1.6.1
OpenSource Video Management
Functions
tools.h File Reference

Auxiliary routines. More...

#include "common.h"
#include "constant.h"
#include "logging.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
Include dependency graph for tools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

long int getCurrentMsTimestamp ()
 Utility function: returns current unix epoch timestamp in milliseconds. Uses timeval.
 
long int getMsDiff (timeval tv1, timeval tv2)
 Utility function: return timedif of two timeval structs in milliseconds.
 
struct timeval msToTimeval (long int mstimestamp)
 Milliseconds to timeval.
 
long int timevalToMs (struct timeval time)
 
bool slotOk (SlotNumber n_slot)
 Timeval to milliseconds. More...
 
void normalize_timespec (struct timespec *ts, time_t sec, int64_t nanosec)
 
uint32_t deserialize_uint32_big_endian (unsigned char *buffer)
 

Detailed Description

Auxiliary routines.

Author
Sampsa Riikonen
Date
2017
Version
1.6.1

Function Documentation

◆ slotOk()

bool slotOk ( SlotNumber  n_slot)

Timeval to milliseconds.

Checks the slot number range