4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 12:59:21 +08:00
newlib-cygwin/libgloss/riscv/semihost-sys_ftime.c
2020-12-16 16:40:34 -05:00

17 lines
311 B
C

/*
* Copyright (C) 2020 Embecosm Limited
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <machine/syscall.h>
#include <sys/timeb.h>
#include "semihost_syscall.h"
/* Get the current time. */
int
_ftime (struct timeb *tp)
{
tp->time = syscall_errno (SEMIHOST_time, 0);
tp->millitm = 0;
return 0;
}