mbgtools-lx
4.2.8
|
#include <cmp_time_util.h>
#include <mbgdevio.h>
#include <toolutil.h>
#include <str_util.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
Go to the source code of this file.
Macros | |
#define | MBG_FIRST_COPYRIGHT_YEAR 2013 |
#define | MBG_LAST_COPYRIGHT_YEAR 0 |
Functions | |
static FILE * | fopen_log (const char *mode) |
static int | do_mbgcmptime (MBG_DEV_HANDLE dh, const PCPS_DEV *p_dev) |
static void | usage (void) |
int | main (int argc, char *argv[]) |
Variables | |
static const char * | pname = "mbgcmptime" |
static int | loops |
static int | read_fast |
static int | read_raw |
static long | sleep_secs |
static long | sleep_usecs |
static int | print_raw |
static double | warn_limit |
static double | chk_limit |
static int | auto_offset |
static int | check_status |
static int | quiet |
static const char * | log_fn |
MBG_PC_CYCLES_FREQUENCY | cyc_freq |
Must be set up tby the application. More... | |
static const char * | ref_dev_param |
static MBG_DEV_HANDLE | dh_ref |
static PCPS_DEV | dev_info_ref |
static const char | term_clreol [] = "\x1B[0K" |
#define MBG_FIRST_COPYRIGHT_YEAR 2013 |
Definition at line 52 of file mbgcmptime.c.
Referenced by main().
#define MBG_LAST_COPYRIGHT_YEAR 0 |
Definition at line 53 of file mbgcmptime.c.
Referenced by main().
|
static |
Definition at line 100 of file mbgcmptime.c.
References auto_offset, check_status, chk_fast_tstamp_supp(), chk_limit, cyc_freq, fopen_log(), get_htc_delta(), get_htc_timestamps(), log_fn, loops, mbg_cond_err_msg(), MBG_ERR_NOT_SUPP_BY_DEV, mbg_get_default_cycles_frequency_from_dev(), mbg_rc_is_error, mbg_snprint_hr_tstamp_ext(), MBG_SUCCESS, print_raw, quiet, read_fast, PCPS_TIME_STAMP::sec, sleep_secs, sleep_usecs, sn_cpy_str_safe(), snprintf_safe(), PCPS_HR_TIME::status, PCPS_HR_TIME_CYCLES::t, term_clreol, PCPS_HR_TIME::tstamp, and warn_limit.
Referenced by main().
|
static |
Definition at line 83 of file mbgcmptime.c.
References log_fn.
Referenced by do_mbgcmptime(), and main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 317 of file mbgcmptime.c.
References auto_offset, check_status, chk_limit, do_mbgcmptime(), fopen_log(), log_fn, loops, mbg_close_device(), MBG_EXIT_CODE_FAIL, MBG_EXIT_CODE_NOT_SUPP, MBG_EXIT_CODE_SUCCESS, MBG_EXIT_CODE_USAGE, MBG_FIRST_COPYRIGHT_YEAR, mbg_get_device_info(), mbg_handle_devices(), MBG_LAST_COPYRIGHT_YEAR, mbg_open_device_by_param(), mbg_print_program_info(), mbg_rc_is_error, mbg_rc_is_success, mbg_strerror(), must_print_usage, pname, quiet, read_fast, read_raw, ref_dev_param, sleep_secs, sleep_usecs, usage(), and warn_limit.
|
static |
Definition at line 273 of file mbgcmptime.c.
References EXAMPLE_DEV_NAME_1, EXAMPLE_DEV_NAME_2, mbg_print_device_options(), mbg_print_help_options(), mbg_print_opt_info(), mbg_print_usage_intro(), and pname.
Referenced by main().
|
static |
Definition at line 66 of file mbgcmptime.c.
Referenced by do_mbgcmptime(), and main().
|
static |
Definition at line 67 of file mbgcmptime.c.
Referenced by do_mbgcmptime(), and main().
|
static |
Definition at line 65 of file mbgcmptime.c.
Referenced by do_mbgcmptime(), and main().
MBG_PC_CYCLES_FREQUENCY cyc_freq |
Must be set up tby the application.
Definition at line 72 of file mbgcmptime.c.
Referenced by do_mbgcmptime().
|
static |
Definition at line 76 of file mbgcmptime.c.
|
static |
Definition at line 75 of file mbgcmptime.c.
|
static |
Definition at line 70 of file mbgcmptime.c.
Referenced by do_mbgcmptime(), fopen_log(), and main().
|
static |
Definition at line 58 of file mbgcmptime.c.
Referenced by do_mbgcmptime(), and main().
|
static |
Definition at line 55 of file mbgcmptime.c.
|
static |
Definition at line 63 of file mbgcmptime.c.
Referenced by do_mbgcmptime().
|
static |
Definition at line 68 of file mbgcmptime.c.
Referenced by do_mbgcmptime(), and main().
|
static |
Definition at line 59 of file mbgcmptime.c.
Referenced by do_mbgcmptime(), and main().
|
static |
Definition at line 60 of file mbgcmptime.c.
Referenced by main().
|
static |
Definition at line 74 of file mbgcmptime.c.
Referenced by main().
|
static |
Definition at line 61 of file mbgcmptime.c.
Referenced by do_mbgcmptime(), and main().
|
static |
Definition at line 62 of file mbgcmptime.c.
Referenced by do_mbgcmptime(), and main().
|
static |
Definition at line 78 of file mbgcmptime.c.
Referenced by do_mbgcmptime().
|
static |
Definition at line 64 of file mbgcmptime.c.
Referenced by do_mbgcmptime(), and main().