delorie.com/djgpp/doc/libc/libc_103.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

clock

Syntax

 
#include <time.h>

clock_t clock(void);

Description

This function returns the number of clock ticks since an arbitrary time, actually, since the first call to clock, which itself returns zero. The number of tics per second is CLOCKS_PER_SEC.

Return Value

The number of tics.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
printf("%d seconds have elapsed\n", clock()/CLOCKS_PER_SEC);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004