mbgtools-lx  4.2.8
mbgsystm.h File Reference
#include <mbg_tgt.h>
#include <words.h>
#include <time.h>
#include <sys/sysinfo.h>

Go to the source code of this file.

Macros

#define _ext   extern
 
#define _mbg_swab_mbg_sys_time(_p)   _nop_macro_fnc()
 

Typedefs

typedef NANO_TIME_64 MBG_SYS_TIME
 
typedef int64_t MBG_SYS_UPTIME
 

Functions

static __mbg_inline void mbg_get_sys_time (MBG_SYS_TIME *p)
 
static __mbg_inline void mbg_get_sys_uptime (MBG_SYS_UPTIME *p)
 
static __mbg_inline long mbg_delta_sys_time_ms (const MBG_SYS_TIME *t2, const MBG_SYS_TIME *t1)
 Compute delta between two MBG_SYS_TIME times, in milliseconds. More...
 
static __mbg_inline void mbg_sleep_sec (long sec)
 

Macro Definition Documentation

◆ _ext

#define _ext   extern

Definition at line 121 of file mbgsystm.h.

◆ _mbg_swab_mbg_sys_time

#define _mbg_swab_mbg_sys_time (   _p)    _nop_macro_fnc()

Definition at line 165 of file mbgsystm.h.

Typedef Documentation

◆ MBG_SYS_TIME

Definition at line 137 of file mbgsystm.h.

◆ MBG_SYS_UPTIME

Definition at line 138 of file mbgsystm.h.

Function Documentation

◆ mbg_delta_sys_time_ms()

static __mbg_inline long mbg_delta_sys_time_ms ( const MBG_SYS_TIME t2,
const MBG_SYS_TIME t1 
)
static

Compute delta between two MBG_SYS_TIME times, in milliseconds.

Parameters
[in]t2the time to be subtracted from
[in]t1The time to be subtracted
Returns
The time difference in [milliseconds]

Definition at line 364 of file mbgsystm.h.

References HNS_PER_MS, NANO_TIME_64::nano_secs, and NANO_TIME_64::secs.

Referenced by wait_ptp270pex_ready().

◆ mbg_get_sys_time()

static __mbg_inline void mbg_get_sys_time ( MBG_SYS_TIME p)
static

Definition at line 171 of file mbgsystm.h.

References FILETIME, NANO_TIME_64::nano_secs, and NANO_TIME_64::secs.

Referenced by ioctl_switch(), and wait_ptp270pex_ready().

◆ mbg_get_sys_uptime()

static __mbg_inline void mbg_get_sys_uptime ( MBG_SYS_UPTIME p)
static

Definition at line 248 of file mbgsystm.h.

References HNS_PER_SEC.

Referenced by pcps_probe_device(), and wait_ptp270pex_ready().

◆ mbg_sleep_sec()

static __mbg_inline void mbg_sleep_sec ( long  sec)
static

Definition at line 387 of file mbgsystm.h.

References HNS_PER_SEC.

Referenced by pcps_probe_device(), and wait_ptp270pex_ready().