Projet_SETI_RISC-V/riscv-gnu-toolchain/newlib/libgloss/riscv/semihost-sys_ftime.c
2023-03-06 14:48:14 +01:00

16 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;
}