monotone

monotone Mtn Source Tree

Root/unix/cputime.cc

1// copyright (C) 2006 Nathaniel Smith <njs@pobox.com>
2// all rights reserved.
3// licensed to the public under the terms of the GNU GPL (>= 2)
4// see the file COPYING for details
5
6#include "base.hh"
7#include <time.h>
8
9double
10cpu_now()
11{
12 return static_cast<double>(clock()) / CLOCKS_PER_SEC;
13}
14
15// Local Variables:
16// mode: C++
17// fill-column: 76
18// c-file-style: "gnu"
19// indent-tabs-mode: nil
20// End:
21// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status