Sha256: a91f912602665e9eb39098e8674c371662108bb05f3a4f0e2e17aa59e46663fc

Contents?: true

Size: 264 Bytes

Versions: 3

Compression:

Stored size: 264 Bytes

Contents

#include <stdio.h>
#include <sys/types.h>
#include "osfreq.c"

long long cpucycles_sparccpuinfo(void)
{
  long long result;
  asm volatile("rd %%tick,%0" : "=r" (result));
  return result;
}

long long cpucycles_sparccpuinfo_persecond(void)
{
  return osfreq();
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby_nacl-0.1.2 ext/ruby_nacl/NaCl/cpucycles/sparccpuinfo.c
ruby_nacl-0.1.1 ext/ruby_nacl/NaCl/cpucycles/sparccpuinfo.c
ruby_nacl-0.1.0 ext/ruby_nacl/NaCl/cpucycles/sparccpuinfo.c