CPUG

The Check Point User Group

A Resource For The Check Point Community.  Fast.  Useful.  Independent.

1. CCSA/CCSE One-Week Dual-Certification Training Course with CPUG in San Francisco!
    Courses Starting (2009) 1/19, 2/9, 3/9, 4/6, 5/4, 6/8, 7/6, 8/3.
2. Join Us On LinkedIn - We now have a CPUG group.


Go Back   CPUG: The Check Point User Group > Check Point Firewall-1/VPN-1 Platforms > Check Point SecurePlatform (SPLAT)
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2007-03-30
Member
 
Join Date: 2006-10-05
Location: Rennes, FRANCE
Posts: 34
Rep Power: 0
aenima has an average reputation (10+)
Default 'clock' command

Hi all,

Do you know what does the 'clock' command stand for in expert mode ? I'm asking since its result is different from the '/bin/date' command and the 'time' command (in admin only).

Thanks.
Reply With Quote
  #2 (permalink)  
Old 2007-04-02
Senior Member
 
Join Date: 2006-01-25
Posts: 1,005
Rep Power: 4
melipla has an average reputation (10+)
Default Re: 'clock' command

Clock is a unix function. The man pages are skimpy, but basically it's the processor time and how long it takes a process to finish. I assume that if it's displaying the wrong time its due to your bios time being wrong. You can see / set your bios time with the "hwclock" command.

CLOCK(3) Linux Programmer’s Manual CLOCK(3)

NAME
clock - Determine processor time

SYNOPSIS
#include <time.h>

clock_t clock(void);

DESCRIPTION
The clock() function returns an approximation of processor time used by
the program.

RETURN VALUE
The value returned is the CPU time used so far as a clock_t; to get the
number of seconds used, divide by CLOCKS_PER_SEC. If the processor
time used is not available or its value cannot be represented, the
function returns the value (clock_t)-1.

CONFORMING TO
ANSI C. POSIX requires that CLOCKS_PER_SEC equals 1000000 independent
of the actual resolution.

NOTES
The C standard allows for arbitrary values at the start of the program;
subtract the value returned from a call to clock() at the start of the
program to get maximum portability.

Note that the time can wrap around. On a 32bit system where
CLOCKS_PER_SEC equals 1000000 this function will return the same value
approximately every 72 minutes.

On several other implementations, the value returned by clock() also
includes the times of any children whose status has been collected via
wait() (or another wait-type call). Linux does not include the times
of waited-for children in the value returned by clock(). The times()
function, which explicitly returns (separate) information about the
caller and its children, may be preferable.
Reply With Quote
  #3 (permalink)  
Old 2007-04-20
Member
 
Join Date: 2006-10-05
Location: Rennes, FRANCE
Posts: 34
Rep Power: 0
aenima has an average reputation (10+)
Default Re: 'clock' command

OK thanks a lot !
Reply With Quote
Reply

Thread Tools
Display Modes

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 Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -7. The time now is 12:11.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0