home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
-
- /******************************************************************************
- *
- * This is where you place the test function prototype, which can be called
- * whatever you like, as long as you make reference to it in function_call()
- * below.
- *
- * Alternatively, you may place the test function in a separately compiled
- * module, as long as you prototype it here and call it in function_call()
- * below.
- *
- ******************************************************************************/
-
- void userfunc(unsigned int a, unsigned int b, unsigned int c);
-
-
-
-
-
- /******************************************************************************
- *
- * These are just dummy variables for this example of userfunc(). They are not
- * necessary for your implementation.
- *
- ******************************************************************************/
-
- unsigned int arg1;
- unsigned int arg2;
- unsigned int arg3;
-
-
-
-
-
- /******************************************************************************
- *
- * setup_userfunc() - This function is called ONCE by c-timer.exe, prior to
- * beginning the timing procedure. It is passed the command
- * line (argc and argv) for you to make use of. Keep in mind
- * that argv[0] is the name of c-timer.exe, argv[1] is the
- * name of the test function (or other text string), and
- * argv[2] is the number of parameters to the test function.
- * If your function needs additional command line parameters,
- * read them here as argv[3] through argv[n].
- *
- * This sample function just prints out the command line.
- * If you have no need for a setup routine, you must still
- * provide this function, although it may consist of only
- * empty {}.
- *
- ******************************************************************************/
-
- void setup_userfunc(int argc, char *argv[])
- {
- int i;
-
- argc--;
-
- fprintf(stdout, "Cmdline = < ");
-
- for( i = 0; i <= argc; i++)
- fprintf(stdout, "%s ", argv[i]);
-
- fprintf(stdout, ">.\n");
-
- }
-
-
-
-
-
-
- /******************************************************************************
- *
- * function_call() - This function is called repeatedly by c-timer.exe during
- * the timing procedure. It should contain only a call to
- * the test function. Any additional code you need to execute
- * before calling your test function should be placed in
- * setup_userfunc() above.
- *
- * You must provide this function, although the test function
- * can be called whatever you like, as long as you prototype
- * it above.
- *
- ******************************************************************************/
-
- void function_call(void)
- {
-
- userfunc(arg1, arg2, arg3);
-
- }
-
-
-
-
-
- /******************************************************************************
- *
- * This is where you place the test function, which can be called whatever
- * you like, as long as you make reference to it in function_call() above, and
- * prototype it above the call in function_call.
- *
- * Alternatively, you may place the test function in a separately compiled
- * module, as long as you prototype it above the call in function_call().
- *
- * This is a sample do-nothing function, provided as an example. If you compile
- * this as-is and link it with the approriate c-timer.obj module (c-timers.obj
- * for SMALL model, c-timerl.obj for LARGE model), the timed result should be
- * 0.001 ms/call 1000000 calls/sec.
- *
- ******************************************************************************/
-
- void userfunc(unsigned int a, unsigned int b, unsigned int c)
- {
- a++;
- b++;
- c++;
- }
-