MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / timeval_diff

Function timeval_diff

Tools/time-func.cpp:8–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include <assert.h>
7
8long long timeval_diff(struct timeval *start_time, struct timeval *end_time)
9{ struct timeval temp_diff;
10 struct timeval *difference;
11 difference=&temp_diff;
12 difference->tv_sec =end_time->tv_sec -start_time->tv_sec ;
13 difference->tv_usec=end_time->tv_usec-start_time->tv_usec;
14 while(difference->tv_usec<0)
15 { difference->tv_usec+=1000000;
16 difference->tv_sec -=1;
17 }
18 return 1000000LL*difference->tv_sec+difference->tv_usec;
19}
20
21double timeval_diff_in_seconds(struct timeval *start_time, struct timeval *end_time)
22{

Callers 12

OTMachineMethod · 0.85
runMethod · 0.85
transferMethod · 0.85
extend_correlatedMethod · 0.85
transposeMethod · 0.85
setupMethod · 0.85
after_correlationMethod · 0.85
correlateMethod · 0.85
hash_outputsMethod · 0.85
consistency_checkMethod · 0.85
check_correlationMethod · 0.85
timeval_diff_in_secondsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected