LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-01-2008, 10:13 AM   #1
namanhams
LQ Newbie
 
Registered: Mar 2008
Posts: 4

Rep: Reputation: 0
return value of Clock function


Hi everyone,

I have a quesion regarding the clock() function. Actually i've read the man page, but still dont understand the return value of this function.

If the function return 10000, is it the number of clock ticks ?
 
Old 04-01-2008, 12:00 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
It is the number of clock cycles your program has used since it was started. You can convert it to a number of seconds by dividing by CLOCKS_PER_SEC.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get return value from C function using shell yhacks Programming 3 03-11-2008 04:58 PM
How can I get the return value of a function in a shellscript? [KIA]aze Programming 8 07-05-2007 08:18 AM
return value of function in script ramesh_manu Red Hat 1 02-18-2007 01:05 PM
using return in recursive function hubabuba Programming 9 10-10-2005 09:59 AM
can a function return a string? hubabuba Programming 13 03-06-2005 02:51 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration