xref: /third_party/musl/compat/time32/clock_getres_time32.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/musl/compat/time32/
1570af302Sopenharmony_ci#include "time32.h"
2570af302Sopenharmony_ci#include <time.h>
3570af302Sopenharmony_ci
4570af302Sopenharmony_ciint __clock_getres_time32(clockid_t clk, struct timespec32 *ts32)
5570af302Sopenharmony_ci{
6570af302Sopenharmony_ci	struct timespec ts;
7570af302Sopenharmony_ci	int r = clock_getres(clk, &ts);
8570af302Sopenharmony_ci	if (!r && ts32) {
9570af302Sopenharmony_ci		ts32->tv_sec = ts.tv_sec;
10570af302Sopenharmony_ci		ts32->tv_nsec = ts.tv_nsec;
11570af302Sopenharmony_ci	}
12570af302Sopenharmony_ci	return r;
13570af302Sopenharmony_ci}
14

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