AnsweredAssumed Answered

Which int type for max TIME STRUCT time elapsed?

Question asked by Jennifer Wasson on Jul 7, 2019
Latest reply on Jul 8, 2019 by vicentegomez



I would like to use below code for a timer.   Is diff_time.MILLISECONDS an int32_t variable like a saw for max_struct_ticks?  If so, why wouldn't it be uint32_t ?  Thanks



TIME_STRUCT   start_time, end_time, diff_time; ... _time_get(&start_time);
/* Send 100 messages. */

_time_diff(&start_time, &end_time, &diff_time);

printf(“Time to send 100 messages: %ld sec %ld millisec\n”, diff_time.SECONDS, diff_time.MILLISECONDS);