/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ | |
/* | |
* Copyright (c) 2019 Amlogic, Inc. All rights reserved. | |
*/ | |
#ifndef AM_COM_H | |
#define AM_COM_H | |
#include <linux/timer.h> | |
static inline void do_gettimeofday(struct timeval *tv) | |
{ | |
struct timespec now; | |
getnstimeofday(&now); | |
tv->tv_sec = now.tv_sec; | |
tv->tv_usec = now.tv_nsec / 1000; | |
} | |
#endif /* AM_COM_H */ |