Time command issuing all zeroes


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Time command issuing all zeroes
# 1  
Old 07-17-2013
Time command issuing all zeroes

I am trying to issue the time command on a program so I can see execution times but it is returning all zeroes. Like this:

time pdriver arg1 arg2
0.000u 0.000s 0:00.00 0.0% 0+0k 0+0io 0pf+0w

"0+0k 0+0io 0pf+0w" --> The "0+0io" may change sometimes to a different number.

How can I run the time command successfully? I'm using a unix terminal and my program is in c++.

Last edited by Don Cragun; 07-18-2013 at 01:14 AM.. Reason: Homework violation. New thread opened in proper forum.
# 2  
Old 07-17-2013
You need to show us your code if you expect accurate advice. Further, the operating system and compiler you're using might be relevant.

Regards,
Alister
# 3  
Old 07-17-2013
I figured that since you're asking me to post code then I might as well make it a homework problem. I made a new thread HERE.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Using alias after issuing 'su - user'

Hi, Using ksh, I have set up aliases (which work fine) in my user's .profile like this: alias ll = 'ls -lrt' alias cls = 'clear' How do I call these same aliases so that they will work after issuing this: ? su - user I do not want to add aliases to the su shell's .profile or .kshrc. (7 Replies)
Discussion started by: ocbit
7 Replies

2. Shell Programming and Scripting

Add file extensions to files EXCEPT the script that is issuing

Greetings all, On a RedHat System - I am issuing a command from script.sh that will add a file extension to a listing of files in a directory. It works, but I need to script from having an extension added as well. Here is what I have tried to no luck: for file in `ls * | awk ' /\./{print... (6 Replies)
Discussion started by: jeffs42885
6 Replies

3. Homework & Coursework Questions

Time command issuing all zeroes (is now considered homework help)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: A common problem arising in games and simulations is to generate a random arrangements of integers from 1 to N.... (5 Replies)
Discussion started by: lamentofking
5 Replies

4. Shell Programming and Scripting

awk and leading zeroes

I have the following script that renames filenames like: blah_bleh_91_2011-09-26_00.05.43AM.xls and transforms it in: 91_20110926_000543_3_blih.xls for a in *.xls; do b="$(echo "${a}" | cut -d '_' -f4)" dia=`echo ${b} | cut -c9-10` mes=`echo ${b} | cut -c6-7` anio=`echo ${b} | cut -c1-4`... (4 Replies)
Discussion started by: Tr0cken
4 Replies

5. UNIX for Advanced & Expert Users

Issuing a Here Document as a Single Line Command

How can I run a here document on just one line? I ask, because I need to issue it from C++ as a system() or similar command and for security reasons I don't want to write out a shell script file from the program and run it. For example, how could I write: passwd test <<EOF n3wp3ss... (3 Replies)
Discussion started by: BrandonShw
3 Replies

6. Shell Programming and Scripting

sed not removing leading zeroes

I have th following file 0000000011 0000000001 0000000231 0000000001 0000000022 noow when i run the following command sed 's/^0+//g' file name I receive the same output and the leading zeroes are not removed from the file . Please let me know how to achieve... (4 Replies)
Discussion started by: asalman.qazi
4 Replies

7. Shell Programming and Scripting

Removing trailing zeroes

So, I can't figure out how to do a previous question with printf, so I'm taking a different approach. Suppose I have a set of numbers: 1200,135.000000,12.30100,3212.3200,1.759403,,1230,101.101010,100.000000 I want to remove all trailing zeroes after the decimal, and, if it ends up orphaned,... (8 Replies)
Discussion started by: treesloth
8 Replies

8. UNIX for Dummies Questions & Answers

Differences between time command and usr/bin/time

I wondered if someone could point out the differences between the time commmand and usr/bin/time and the accuracy one might have over another. Also, is there a website or two a person could maybe link for me to describe the differences? Thank you for your time. (2 Replies)
Discussion started by: icedrake
2 Replies

9. UNIX for Dummies Questions & Answers

How to left trim padded zeroes

I have a filename 'INITIATE_FINAL_ALL_000080889.dat', and I want to capture just the number '80889' from it. Here is what I have so far: %> echo INITIATE_FINAL_ALL_000080889.dat | sed "s/*//g" 000080889 Now, I just need to trim off the padded zeroes. Thanks, - CB (3 Replies)
Discussion started by: ChicagoBlues
3 Replies
Login or Register to Ask a Question