xref: /third_party/musl/compat/time32/getitimer_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#include <sys/time.h>
4570af302Sopenharmony_ci
5570af302Sopenharmony_ciint __getitimer_time32(int which, struct itimerval32 *old32)
6570af302Sopenharmony_ci{
7570af302Sopenharmony_ci	struct itimerval old;
8570af302Sopenharmony_ci	int r = getitimer(which, &old);
9570af302Sopenharmony_ci	if (r) return r;
10570af302Sopenharmony_ci	old32->it_interval.tv_sec = old.it_interval.tv_sec;
11570af302Sopenharmony_ci	old32->it_interval.tv_usec = old.it_interval.tv_usec;
12570af302Sopenharmony_ci	old32->it_value.tv_sec = old.it_value.tv_sec;
13570af302Sopenharmony_ci	old32->it_value.tv_usec = old.it_value.tv_usec;
14570af302Sopenharmony_ci	return 0;
15570af302Sopenharmony_ci}
16

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