This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 | |
13 | |
47 | |
allocate CHAR s1 200 "fail" | |
allocate CHAR s1 20 " a" | |
allocate CHAR s2 4 "b " | |
allocate CHAR s3 5 " c " | |
allocate CHAR s4 8 " d d " | |
allocate CHAR s5 4 "" | |
allocate CHAR s6 16 " " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
team_stats stats; | |
sscanf((char *)line.c_str(), | |
"%[^\t]%d%f%d%d%f%f%f%d%d%d%d%d%d%d%d%s%d%d%d", | |
stats.team_name, | |
&stats.games, | |
&stats.pts_per_game, | |
&stats.total_points, | |
&stats.scrimmage_plays, | |
&stats.yds_per_game, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
double getCPUTimeSeconds() { | |
clock_t time = clock(); | |
return (double)time / CLOCKS_PER_SEC; | |
} | |
double getWallTimeSeconds() { | |
struct timespec time; | |
clock_gettime(CLOCK_MONOTONIC, &time); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
#include <stdio.h> | |
int main(int argc, char **argv) { | |
clock_t start = clock(), diff; | |
for (int i=100000000; i>0; i--) { | |
} | |
diff = clock() - start; |
NewerOlder