File: timer_utils.h

package info (click to toggle)
netcdf-parallel 1%3A4.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 113,164 kB
  • sloc: ansic: 267,893; sh: 12,869; cpp: 5,822; yacc: 2,613; makefile: 1,813; lex: 1,216; xml: 173; awk: 2
file content (30 lines) | stat: -rw-r--r-- 922 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*********************************************************************
 *   Copyright 2020, UCAR/Unidata
 *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
 *********************************************************************/

#ifndef TIMER_UTILS_H
#define TIMER_UTILS_H 1

#include "netcdf.h"

/* Wrap time interval computations */
typedef struct Nanotime {
    long long tv_sec; /* seconds */
    long long tv_nsec; /* nanoseconds */
} Nanotime;


struct TimeRange {
    long long min;
    long long max;
};

extern void NCT_inittimer(void);
extern void NCT_marktime(Nanotime* nt);
extern void NCT_elapsedtime(Nanotime* nt0, Nanotime* nt1, Nanotime* delta);
extern int NCT_reporttime(unsigned count, Nanotime* times, struct TimeRange, const char* tag);
extern long long NCT_nanoseconds(Nanotime time);
extern int NCT_rangetest(long long nsecs, struct TimeRange range);
#endif /*TIMER_UTILS_H*/