1 /* 2 * time.c 3 * 4 * Created on: 2010-11-17 5 * Author: bernard 6 */ 7 8 #include <stdio.h> 9 #include <stdlib.h> 10 #include <finsh.h> 11 speed()12int speed() 13 { 14 int i; 15 time_t t; 16 17 printf("%d\n", time(0)); 18 for (i = 0; i < 10000000; ++i) 19 t = time(0); 20 21 printf("%d\n", time(0)); 22 return 0; 23 } 24 FINSH_FUNCTION_EXPORT(speed, speed test); 25