Welcome to mirror list, hosted at ThFree Co, Russian Federation.

semihost-sys_ftime.c « riscv « libgloss - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aeafc6ca2d02a630e48e13241608f94614dc4935 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * 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;
}