mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-26 22:48:23 +00:00
Use long for nsecs.
This commit is contained in:
@@ -22,19 +22,13 @@
|
||||
#include <time.h>
|
||||
#include <sched.h>
|
||||
|
||||
void diff_timespec(
|
||||
struct timespec *start,
|
||||
struct timespec *stop,
|
||||
struct timespec *result
|
||||
);
|
||||
|
||||
void diff_timespec(
|
||||
struct timespec *start,
|
||||
struct timespec *stop,
|
||||
struct timespec *result
|
||||
)
|
||||
{
|
||||
int nsecs_per_sec = 1000000000;
|
||||
const long nsecs_per_sec = 1000000000;
|
||||
|
||||
result->tv_sec = stop->tv_sec - start->tv_sec;
|
||||
if ( stop->tv_nsec < start->tv_nsec ) {
|
||||
|
||||
Reference in New Issue
Block a user