1 /* 2 * Copyright (c) 2006-2021, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2010-11-17 Bernard first version 9 */ 10 11 #include <stdio.h> 12 #include <stdlib.h> 13 #include <finsh.h> 14 speed()15int speed() 16 { 17 int i; 18 time_t t; 19 20 printf("%d\n", time(0)); 21 for (i = 0; i < 10000000; ++i) 22 t = time(0); 23 24 printf("%d\n", time(0)); 25 return 0; 26 } 27 FINSH_FUNCTION_EXPORT(speed, speed test); 28