fsautoproc
Basic file transformation automation management utility
Loading...
Searching...
No Matches
tm.c File Reference

Time utility implementation. More...

#include "tm.h"
#include <assert.h>
#include <stdio.h>
#include <time.h>
#include "log.h"
Include dependency graph for tm.c:

Functions

uint64_t tmnow (void)
 Get the current system time in milliseconds.
void tmsleep (const uint32_t ms)
 Sleep for the specified number of milliseconds.

Detailed Description

Time utility implementation.

Function Documentation

◆ tmnow()

uint64_t tmnow ( void )

Get the current system time in milliseconds.

Returns
current time in milliseconds
Here is the caller graph for this function:

◆ tmsleep()

void tmsleep ( uint32_t ms)

Sleep for the specified number of milliseconds.

Note
This function will block the calling thread. The sleep duration may be longer than the specified time due to system scheduling. The function may fail internally via the underlying system call. This will be indicated by a log message, but the function will not return an error code.
Parameters
msThe number of milliseconds to sleep. Must be greater than 0.
Here is the caller graph for this function: