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 <time.h>
7
8double
9cpu_now()
10{
11 return static_cast<double>(clock()) / CLOCKS_PER_SEC;
12}
13
14// Local Variables:
15// mode: C++
16// fill-column: 76
17// c-file-style: "gnu"
18// indent-tabs-mode: nil
19// End:
20// 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