Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

time(1t) [opensolaris man page]

time(1T)						       Tcl Built-In Commands							  time(1T)

__________________________________________________________________________________________________________________________________________________

NAME
time - Time the execution of a script SYNOPSIS
time script ?count? _________________________________________________________________ DESCRIPTION
This command will call the Tcl interpreter count times to evaluate script (or once if count isn't specified). It will then return a string of the form 503 microseconds per iteration which indicates the average amount of time required per iteration, in microseconds. Time is measured in elapsed time, not CPU time. EXAMPLE
Estimate how long it takes for a simple Tcl for loop to count to a thousand: time { for {set i 0} {$i<1000} {incr i} { # empty body } } SEE ALSO
clock(1T) KEYWORDS
script, time ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTcl | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tcl is available on http://opensolaris.org. Tcl time(1T)

Check Out this Related Man Page

Tcl_GetTime(3TCL)					      Tcl Library Procedures						 Tcl_GetTime(3TCL)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_GetTime - get date and time SYNOPSIS
#include <tcl.h> Tcl_GetTime( timePtr ) ARGUMENTS
Tcl_Time * timePtr (out) Points to memory in which to store the date and time information. _________________________________________________________________ DESCRIPTION
The Tcl_GetTime function retrieves the current time as a Tcl_Time structure in memory the caller provides. This structure has the follow- ing definition: typedef struct Tcl_Time { long sec; long usec; } Tcl_Time; On return, the sec member of the structure is filled in with the number of seconds that have elapsed since the epoch: the epoch is the point in time of 00:00 UTC, 1 January 1970. This number does not count leap seconds - an interval of one day advances it by 86400 seconds regardless of whether a leap second has been inserted. The usec member of the structure is filled in with the number of microseconds that have elapsed since the start of the second designated by sec. The Tcl library makes every effort to keep this number as precise as possible, subject to the limitations of the computer system. On multiprocessor variants of Windows, this number may be limited to the 10- or 20-ms granularity of the system clock. (On single-processor Windows systems, the usec field is derived from a performance counter and is highly precise.) SEE ALSO
clock KEYWORDS
date, time ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTcl | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tcl is available on http://opensolaris.org. Tcl 8.4 Tcl_GetTime(3TCL)
Man Page

14 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

counts

How can i do a simple record count in my shell script? i just want to count the number of records i receive from a specific file. (11 Replies)
Discussion started by: k@ssidy
11 Replies

2. UNIX for Dummies Questions & Answers

date is not getting the filedate value.

I have the following script. I am trying to get the date time when an empty file was created. In my situation if an empty file is created it won't be touched again. At the end of the script I state the problem- the #!/bin/ksh #Source the file . $HOME/.profile typeset -L100 fname typeset... (13 Replies)
Discussion started by: radhika
13 Replies

3. UNIX for Dummies Questions & Answers

simple unpack script

hi all.... I'm a newbie to Shell scripting and am trying to make a simple script that can unpack a variety of .tgz , .zip, .tar or .tar.gz archives to the a current directory i want the script to create a folder equivalent to the base name of the archive and then move the archive to a... (18 Replies)
Discussion started by: jboss
18 Replies

4. UNIX for Advanced & Expert Users

why script fails sometime?

Hi, I am trying to run a shell script on solaris,some time it works fine and some times it fails unexpectedly. There is a script called "autostart.sh" which automatically starts the Application server but some times the script fails to strat the application server. can anyone tell me what... (10 Replies)
Discussion started by: tahir23
10 Replies

5. UNIX for Dummies Questions & Answers

Need help with script

Hi guys. i have this 2 seperate script. Is there any way i can put them together in a single script? the code return from this sql query is: count ------- 0 (1 row) su -l postgres -s /bin/sh -c "psql -c 'SELECT count(*) FROM pdata WHERE updata=0 LIMIT 10' -d " >x op=`awk... (10 Replies)
Discussion started by: hanyou.lin
10 Replies

6. Shell Programming and Scripting

count up file

Hi i have a problem i am going to serch for files and i have a bash script but the problem i have is that the file names are like bser00001, bser00002 etc. and when i serch for files it start to serch for bser1, bser2, etc how can i do so it counts 00001, 00002 etc. i wrote in a while loop... (12 Replies)
Discussion started by: waqar
12 Replies

7. UNIX for Dummies Questions & Answers

counting in unix

my script: count=0while test $count -lt 10do#do something for 0,1,2...9 count=$(($count+1))doneIt doesnt work. Can anyone tell me what im doing wrong?? thanks (11 Replies)
Discussion started by: JamieMurry
11 Replies

8. UNIX and Linux Applications

Please Help Me...

Hi, I am beginner using unix. I want you to help anybudy to show me the script to count data in directory....below this my directory.... /ebs/home/ebs_dba/nazrul/temp MKZSX510>ll total 0 -rw-r--r-- 1 ebs_dba users 0 Apr 19 16:50 blabla.edi -rw-r--r-- 1 ebs_dba users... (10 Replies)
Discussion started by: mastercar
10 Replies

9. Shell Programming and Scripting

Total Time

Hello, I have one script which takes some time to complete. I Need the total exact time taken by this script. How can i modify this script. Regards, Sam. (21 Replies)
Discussion started by: j_panky
21 Replies

10. Shell Programming and Scripting

file descriptor count

I am trying to write a script which will only show me the file descriptor count for a process/pid. My script will return me the count only not the whole output. For example, I would like my script to return the output 23 this case, not the whole output. Can anybody please help me how do I get... (11 Replies)
Discussion started by: mohullah
11 Replies

11. UNIX for Dummies Questions & Answers

Beginner needs help with first script

Hi, so I have been doing ok making a relatively simple script just processing some data. However I am now at the point where im struggling to find the specific help I need. I have files in the form of yyyy.ddd.hh.mm.ss.stationnumber.component (they are earthquake events). eg.... (12 Replies)
Discussion started by: neneman3000
12 Replies

12. Shell Programming and Scripting

Record count checking for multiple files through for-loop

Hi Friends, I wrote one shell script to check the record count in two files and that will send us the notification activity if found zero record count. What i did is I created for loop and checking the count for both of the files but what is happening is for first file has data then it's... (13 Replies)
Discussion started by: victory
13 Replies

13. Shell Programming and Scripting

Word Occurrences script using awk

I'm putting together a script that will the count the occurrences of words in text documents. It works fine so far, but I'd like to make a couple tweaks/additions: 1) I'm having a hard time displaying the array index number, tried freq which just spit 0's back at me 2) Is there any way to... (12 Replies)
Discussion started by: ksmarine1980
12 Replies

14. Shell Programming and Scripting

First script in a long time

I was wondering if I could get some feedback on my script to grab time from our MDM... I blocked out all of the important stuff. I really appreciate any guidance, since I am long out of practice. #!/bin/bash serial=$1 # get last seen value of ipad lastseen=$(curl -s -X "GET"... (11 Replies)
Discussion started by: andysensible
11 Replies