SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Static Public Member Functions | List of all members
TimeUtil Class Reference

#include <timeutil.h>

Static Public Member Functions

static uint64_t nowms ()
 returns the current epoch in milliseconds More...
 
static uint64_t nowus ()
 returns the current epoch in microseconds More...
 

Detailed Description

Definition at line 23 of file timeutil.h.

Member Function Documentation

◆ nowms()

uint64_t TimeUtil::nowms ( )
static

returns the current epoch in milliseconds

Definition at line 20 of file timeutil.cpp.

Referenced by Command::processError(), Command::processFinished(), and Command::run().

21 {
22  auto now = std::chrono::system_clock::now();
23  auto now_ms = std::chrono::time_point_cast<std::chrono::milliseconds>(now);
24  auto epoch = now_ms.time_since_epoch();
25  auto value = std::chrono::duration_cast<std::chrono::milliseconds>(epoch);
26 
27  return value.count();
28 }
+ Here is the caller graph for this function:

◆ nowus()

uint64_t TimeUtil::nowus ( )
static

returns the current epoch in microseconds

Definition at line 30 of file timeutil.cpp.

Referenced by RemoteOutputThread::getSamplesCount(), and UDPSinkFEC::write().

31 {
32  auto now = std::chrono::system_clock::now();
33  auto now_ms = std::chrono::time_point_cast<std::chrono::microseconds>(now);
34  auto epoch = now_ms.time_since_epoch();
35  auto value = std::chrono::duration_cast<std::chrono::microseconds>(epoch);
36 
37  return value.count();
38 }
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: