xref: /third_party/musl/src/time/ftime.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/musl/src/time/
1570af302Sopenharmony_ci#include <sys/timeb.h>
2570af302Sopenharmony_ci#include <time.h>
3570af302Sopenharmony_ci
4570af302Sopenharmony_ciint ftime(struct timeb *tp)
5570af302Sopenharmony_ci{
6570af302Sopenharmony_ci	struct timespec ts;
7570af302Sopenharmony_ci	clock_gettime(CLOCK_REALTIME, &ts);
8570af302Sopenharmony_ci	tp->time = ts.tv_sec;
9570af302Sopenharmony_ci	tp->millitm = ts.tv_nsec / 1000000;
10570af302Sopenharmony_ci	tp->timezone = tp->dstflag = 0;
11570af302Sopenharmony_ci	return 0;
12570af302Sopenharmony_ci}
13

Indexes created Thu Nov 07 10:32:03 CST 2024