PiImageStreamer
Loading...
Searching...
No Matches
time_util.cpp File Reference
#include <chrono>
#include "time_util.h"
Include dependency graph for time_util.cpp:

Functions

int current_timestamp ()
 
double calculateDelta (struct timeval start, struct timeval end)
 

Detailed Description

Author
Walter Schilling (schil.nosp@m.ling.nosp@m.@msoe.nosp@m..edu)
Version
1.0

LICENSE

This code is developed as part of the MSOE SWE4211 Real Time Systems course, but can be freely used by others.

SWE4211 Real Time Systems is a required course for students studying the discipline of software engineering.

This Software is provided under the License on an "AS IS" basis and without warranties of any kind concerning the Software, including without limitation merchantability, fitness for a particular purpose, absence of defects or errors, accuracy, and non-infringement of intellectual property rights other than copyright. This disclaimer of warranty is an essential part of the License and a condition for the grant of any rights to this Software.

DESCRIPTION

This file implements a set of time utilities used for basic timestamping.

Function Documentation

◆ calculateDelta()

double calculateDelta ( struct timeval  start,
struct timeval  end 
)

This method will calculate the time delta between two timestamps.

Parameters
startThis is the starting time.
endThis is the ending time.
Returns
The return will be the delta time between these, in ms.

◆ current_timestamp()

int current_timestamp ( )

This method will return a current timestamp, in ms since the start of the Epoch, truncated to an int.

Returns
The return will be a timestamp with accuracy to the nearest ms.
Here is the caller graph for this function: