www.delorie.com/djgpp/doc/libc-2.02/libc_94.html   search  
Go to the first, previous, next, last section, table of contents.


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, POSIX

Example

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


Go to the first, previous, next, last section, table of contents.

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 1998   by DJ Delorie     Updated Dec 1998  

Please take a moment to fill out this visitor survey
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)