OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [runtime/] [go-nanotime.c] - Blame information for rev 833

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 747 jeremybenn
// Copyright 2009 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
4
 
5
// Return current time in nanoseconds.
6
 
7
#include <sys/time.h>
8
 
9
#include "runtime.h"
10
 
11
int64 runtime_nanotime (void)
12
  __attribute__ ((no_split_stack));
13
 
14
int64
15
runtime_nanotime (void)
16
{
17
  struct timeval tv;
18
 
19
  gettimeofday (&tv, NULL);
20
  return (int64) tv.tv_sec * 1000000000 + (int64) tv.tv_usec * 1000;
21
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.