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
clock_getres(3) 					     Library Functions Manual						   clock_getres(3)

NAME
clock_getres - Gets the resolution for the specified clock (P1003.1b) LIBRARY
Realtime Library (librt.so, librt.a) SYNOPSIS
#include <time.h> int clock_getres ( clockid_t clock_id, struct timespec *res); PARAMETERS
clock_id The clock type used to obtain the resolution. The CLOCK_REALTIME clock is supported and represents the TIME-OF-DAY clock for the system. *res A pointer to the timespec data structure that receives the value of the clock's resolution. DESCRIPTION
The clock_getres function returns the resolution value for the specified clock. If the res argument is NULL, the clock resolution is not returned. RETURN VALUES
On a successful call, a value of 0 (zero) is returned. On an unsuccessful call, a value of -1 is returned and errno is set to indicate that an error occurred. ERRORS
The clock_getres function fails under the following condition: [EINVAL] The clock_id argument does not specify a known clock. RELATED INFORMATION
Functions: time(1), ctime(3), timer_settime(3) Guide to Realtime Programming delim off clock_getres(3)
All times are GMT -4. The time now is 04:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy