# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- C:\Users\User\Documents\NetBeansProjects\ProfilingDemo_1\common.h +++ C:\Program Files\TortoiseHg\cnd-main\cnd.makeproject\samples_src\profiling\common.h @@ -35,7 +35,6 @@ #endif #include -#include // Tracing typedef enum { @@ -50,7 +49,7 @@ #define REF(fmt, ...) if (msg_levels & msg_ref) { printf(fmt, ##__VA_ARGS__); } #define TRACE(fmt, ...) if (msg_levels & msg_trace) { printf(fmt, ##__VA_ARGS__); } #define EXPLAIN(fmt, ...) if (msg_levels & msg_explain) { printf(fmt, ##__VA_ARGS__); } -#define PAUSE(fmt, ...) if (msg_levels & msg_explain) { print_run_time(); printf(fmt, ##__VA_ARGS__); getchar(); } +#define PAUSE(fmt, ...) if (msg_levels & msg_explain) { printf(fmt, ##__VA_ARGS__); getchar(); } #define ERROR(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__); // CPU usage types @@ -88,7 +87,6 @@ int cpucount(); void mem2str(char* buf, long bytes); -struct timeval globalstarttime; // Check available pthread features #include # This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- C:\Users\User\Documents\NetBeansProjects\ProfilingDemo_1\common.c +++ C:\Program Files\TortoiseHg\cnd-main\cnd.makeproject\samples_src\profiling\common.c @@ -56,17 +56,6 @@ TRACE("work %d: Done sleeping\n", work_id); } -void get_run_time(struct timeval* a) { - gettimeofday(a, 0); - a->tv_sec -= globalstarttime.tv_sec; -} - -void print_run_time () { - struct timeval a; - get_run_time(&a); - TRACE("\nProgram works %ld seconds \n\n", a); - } - static void work_run_usrcpu(int work_id, long micros) { TRACE("work %d: Starting mathematical calculations...\n", work_id); long i = 0, j = 0; # This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- C:\Users\User\Documents\NetBeansProjects\ProfilingDemo_1\main.c +++ C:\Program Files\TortoiseHg\cnd-main\cnd.makeproject\samples_src\profiling\main.c @@ -53,8 +53,6 @@ msg_levels = msg_explain | msg_trace; - gettimeofday(&globalstarttime,0); - sequential_demo(work_count, works, 10); parallel_demo(work_count, works, 10);