Sponsored Content
Full Discussion: clock cycle count
Top Forums Programming clock cycle count Post 302261671 by jim mcnamara on Tuesday 25th of November 2008 10:04:27 AM
Old 11-25-2008
Use the clock() function in time.h
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell cycle

Hello I got a cycle in the script which open another scripts. if then action fi Scripts action will be running 2 times at the same time. Inside of action() is insert into the table. But what I want is that only first script can do insert into table. So how to do... (2 Replies)
Discussion started by: mape
2 Replies

2. Shell Programming and Scripting

For cycle

Hello, I have files in a dir. I what to create a FOR cycle that will do this FOR <condition> do file=`ls <directory> | tail -1` echo $file mv -f $file <another dir> done What I want to now is what should I put in the <condition>. The condition I want is that the FOR will execute... (3 Replies)
Discussion started by: nagomes
3 Replies

3. Shell Programming and Scripting

wildcard in a if cycle

hello everybody, I need help on putting a wildcard match inside an if condition (I'm using korn shell): if ] then echo ' ' echo ''$MYSEL' is not a correct option' echo ' ' else ..... i tried also #if -ne "``" and a lot of combinations of `"' but I didn't find the... (2 Replies)
Discussion started by: elionba82
2 Replies

4. Shell Programming and Scripting

for cycle

Hello, I have a question: is there a way to have a "for" cycle done a certain number of times. For example in c++ I can do this: for (i=o;i<10;i++) and the cycle will be repeated 10 times. in UNIX for example I do this: for i in `cat /etc/host` do done and the cycle will be repeated... (6 Replies)
Discussion started by: jcpetela
6 Replies

5. Shell Programming and Scripting

for cycle question

i have a question how to modify below script to generate the expect result below : test.sh #!/bin/bash for ((i=0; i < 25; i++)) do echo $1$i done current result: test.sh 20090101 200901010 200901011 200901012 200901013 200901014 200901015 200901016 200901017 200901018 (2 Replies)
Discussion started by: bleach8578
2 Replies

6. Shell Programming and Scripting

Cycle for with for-then-else

Hi, i would like to insert a if-then-else function in to cycle for -------------- cat test -------------- # cat test ALFA BETA GAMMA ----------------------- This is my script: #!/bin/bash for i in $(cat test); if ; then echo "ok" else (5 Replies)
Discussion started by: elilmal
5 Replies

7. Shell Programming and Scripting

For cycle and formatting stdout

Dear all, I want to create a table using a shell script. Hope someone can help. I created a variable that contains the path for different files. For all the files I want to do calculations and print it to stdout (or file) as a table. I tried this code: paths=`cat $tabdelim_file | awk... (7 Replies)
Discussion started by: Higgo
7 Replies
ADJTIME(2)						     Linux Programmer's Manual							ADJTIME(2)

NAME
adjtime - smoothly tune kernel clock SYNOPSIS
#include <sys/time.h> int adjtime(const struct timeval *delta, struct timeval *olddelta); DESCRIPTION
This function speeds up or slows down the system clock in order to make a gradual adjustment. This ensures that the calendar time reported by the system clock is always monotonically increasing, which might not happen if you simply set the clock. The delta argument specifies a relative adjustment to be made to the clock time. If negative, the system clock is slowed down fora while until it has lost this much elapsed time. If positive, the system clock is speeded up for a while. If the olddelta argument is not a null pointer, the adjtime function returns information about any previous time adjustment that has not yet completed. This function is typically used to synchronize the clocks of computers in a local network. You must be a privileged user to use it. RETURN VALUE
The adjtime function returns 0 on success and -1 on failure and sets the external variable errno accordingly. ERRORS
EPERM The calling process does not have enough privileges to access the clock. NOTE
With a Linux kernel, you can use the adjtimex(2) function to permanently change the system clock speed. CONFORMING TO
This function is derived from 4.3 BSD and SVr4. SEE ALSO
adjtimex(2), settimeofday(2) Linux 2.0 2002-02-16 ADJTIME(2)
All times are GMT -4. The time now is 09:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy