/* * timemachine_api_create_test.cc * * An example program demonstrating writing of trace files using the * TimeMachine API. It should be launched from the Windows command prompt * or a Unix shell. * * The file interface is used to create "*.tra" files containing trace data * from an external source which are to be viewed and analyzed in * TimeMachine. A "*.tra" file can be loaded into TimeMachine by entering * the "traceload filename" command at the MULTI command prompt where * "filename" is the name of the "*.tra" file to be loaded. */ #include "timemachine_api.h" #include #include #include void print_usage(const char *progname) { printf("Usage: %s [-tools_dir ] []\n" "If the tools directory is not specified the current working\n" "directory will be used.\n" "If an output filename is not specified timemachine_api_example.tra\n" "will be used.\n", progname); } int main(int argc, char **argv) { // Defaults char *tools_dir = "."; char *filename = "timemachine_api_example.tra"; // Parse arguments. bool found_filename = false; for(int i=1; i