sim/oneshot: Remove redundant variables.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
parent
6020cdb816
commit
781c27a98e
1 changed files with 3 additions and 8 deletions
|
@ -113,15 +113,10 @@ static const struct oneshot_operations_s g_oneshot_ops =
|
|||
|
||||
static inline void sim_timer_current(struct timespec *ts)
|
||||
{
|
||||
uint64_t nsec;
|
||||
time_t sec;
|
||||
uint64_t nsec = host_gettime(false);
|
||||
|
||||
nsec = host_gettime(false);
|
||||
sec = nsec / NSEC_PER_SEC;
|
||||
nsec -= sec * NSEC_PER_SEC;
|
||||
|
||||
ts->tv_sec = sec;
|
||||
ts->tv_nsec = nsec;
|
||||
ts->tv_sec = nsec / NSEC_PER_SEC;
|
||||
ts->tv_nsec = nsec % NSEC_PER_SEC;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
Loading…
Reference in a new issue