Sponsored Content
Full Discussion: time function
Top Forums Shell Programming and Scripting time function Post 302111112 by hsekol on Monday 19th of March 2007 06:55:10 AM
Old 03-19-2007
time function

hi matrixmadhan,

thanks for your reply,

the code

Code:
     char command[50];
sprintf(command, "time %s", commandtorun);

I think code which u have given will not work in ksh program. can u send me the code relavent to ksh

thanks,
hsekol
 

10 More Discussions You Might Find Interesting

1. Programming

C time in milliseconds function.

I need a c function which return the time in: hour min sec and mil sec I am writing on unix os. (3 Replies)
Discussion started by: kamil
3 Replies

2. Programming

find CPU Time for a function (subsecond precision)

Hi, I need to time a certain function in my C/C++ code and I am experiencing some difficulties. I timed it using wallclock time so I know that it takes approximately 500-600 microseconds with gettimeofday(&start, NULL); // my function call gettimeofday(&end, NULL); answer = (end.tv_sec -... (2 Replies)
Discussion started by: zynnel
2 Replies

3. Programming

function time

Hello I have problem with function 'time' to test my program for file copying . How to run the function in my source code ? I try something like that: system("time"); < -- but this don't working (2 Replies)
Discussion started by: scotty_123
2 Replies

4. Shell Programming and Scripting

Nawk Time Function

Hi All, I am using solaris and nawk. Is there any time function in nawk which is simliar to the shell `date` function ? Can any experts show any examples? (4 Replies)
Discussion started by: Raynon
4 Replies

5. Shell Programming and Scripting

Unix function to calcuate the difference in time

HI , I need to get the timedifference between two values... which funcation will help eg: difference betweem 19:22 and 19:43 should give 21 mins (2 Replies)
Discussion started by: savitha
2 Replies

6. UNIX for Dummies Questions & Answers

time function

hello everybody! i want to post a question. So, I use the command 'time a.out' to time the duration of the program a.out. The return value of this function was: real 0m4.116s user 0m4.112s sys 0m0.016s What i want is! I try to find a way to get (NOT manually) the value of real time.... (2 Replies)
Discussion started by: nicos
2 Replies

7. Red Hat

lightweight function for measuring time ( better than clock_getime )

HI I have a Red Hat Enterprise with Real Time kernel. Are you aware if there are C functions for this kernel or some code/library for this OS for measuring time more lightweight than clock_gettime and gettimeofday? THe hardware I have is NUMA. Reading forums I found gethrtime but it is... (1 Reply)
Discussion started by: manustone
1 Replies

8. Shell Programming and Scripting

/usr/bin/time Shell Scripting Function

Hello, I have made a Linux Shell Script that downloads 6 files from the Internet and then deletes them. Now i want to use the function "/usr/bin/time" and "bc" to calculate how long the avergate run time for the shell script is. I therefore need to do it 100 times. My shell script code is below: ... (6 Replies)
Discussion started by: solo2
6 Replies

9. Homework & Coursework Questions

Helpm with time function

I want to print the difference (in days) between ($7) and the oldest record date ($6) based on unique ID ($5) on a new field. In addition, I want to subtract oldest date from recent dates(in days) ($6) for each unique ID ($5). Here is the data looks like 7 81 1 47 32070 2010-12-14 ... (11 Replies)
Discussion started by: alula
11 Replies

10. OS X (Apple)

'time' does NOT work on a function in 'dash'.

Hi guys and gals... I am writing a piece of code that is dash compliant and came across this error. I have put it in the OSX section as that is what I am using. I have no idea what the 'dash' version is but was installed about 6 months ago. MBP, OSX 10.12.6, default terminal running dash on... (4 Replies)
Discussion started by: wisecracker
4 Replies
EKGLOGS(1)						      General Commands Manual							EKGLOGS(1)

NAME
ekglogs - a logs lister for EKG SYNTAX
ekglogs [ options ] < ~/.gg/history DESCRIPTION
ekglogs reads ekg logs on standard input and prints them out nicely formatted on standard output. OPTIONS
-t don't display time at all -d don't display day changes -x always print nicknames -v never display nicknames (by default: print nicknames unless either `u' or `n' was specified) -r display incoming messages' receipt time -R like -r and align outgoing messages -s display seconds -S display receipt time seconds -C display a colon between hours and minutes -b do not display malformed lines (they start with !!!) -a do not display status changes -c use colourful display -h display help message -u UIN display only messages from/to UIN -n NICK display only messages from/to NICK Options don't need to be preceded with `-', and may be concatenated. Option `u' or `n' should be specified as last one. You should not specify both `u' and `n'. AUTHOR
Robert Goliasz <rgoliasz@poczta.onet.pl> SEE ALSO
ekg(1) 7 September 2003 EKGLOGS(1)
All times are GMT -4. The time now is 01:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy