Sponsored Content
Top Forums Programming How to halt Prog Execution for some time? Post 40013 by Ahsan on Sunday 7th of September 2003 03:01:25 AM
Old 09-07-2003
Question How to halt Prog Execution for some time?

Hi,
Perhaps I am asking a silly question, but I really don't know about it. Can anyone tell me the function for "sleep" kind of functionality in C language for Unix. I don't think any function with the name of sleep() exits in Unix's C language. or perhaps I am not known with the header file required for this. Can anyone guide me about the correct function to halt the program execution for a specified time? Do tell me the header file required for the function as well.

Regards,
 

10 More Discussions You Might Find Interesting

1. Programming

execution time

hi , i ve coded a C program in that im using malloc dynamically , it is being called many times in the program The program is to simulate jobs in manufacturing system. the execution time is increasing drastically as the number of jobs are increased. could any body tel what may be the problem... (2 Replies)
Discussion started by: ramki_rk
2 Replies

2. UNIX for Dummies Questions & Answers

last execution time

is there a command in Solaris 8 that will show a particular scripts last execution time? (1 Reply)
Discussion started by: cubs0729
1 Replies

3. UNIX for Advanced & Expert Users

specifying an execution time

Hi all, do ny o u'll know how to set a particular execution time for a program??? for eg.: --> during the execution of a file, i call a certain other function. --> while calling this function, my comp hangs. now is there ny way in which i can go to the nxt line of code by aborting the call... (7 Replies)
Discussion started by: VGR
7 Replies

4. Shell Programming and Scripting

Estimated execution time

Hi All, One of my script runs (approximately) for 20 to 40 hours Is there any way in unix to find the estimated time required for a shell script(Cron job).ie to find the time required for execution even before the script is executed. Any discussion(pointers) regarding the same is most welcome. (4 Replies)
Discussion started by: Sreejith_VK
4 Replies

5. Shell Programming and Scripting

To reduce execution time

Hi All, The below script I run daily and it consumes 2 hours approx. In this I am calling another script and executing the same twice. Is the loop below the cause for the slow process?Is it possible to finetune the program so that it runs in a much faster way? The first script: #!/bin/ksh... (4 Replies)
Discussion started by: Sreejith_VK
4 Replies

6. Shell Programming and Scripting

command execution time

Hi all, I want to display a progressbar depending upon the completion status of a command. I am coding from scratch as I dont want to use in place code. so Is there anyway of getting the progress of a command in percentage or in any other units while its running , is it possible using the top... (5 Replies)
Discussion started by: hashin_p
5 Replies

7. Shell Programming and Scripting

time of execution of script

i want to test whether a script has been executed in last 15 days or not....please help how can i do this...is there any copmmand there to know timings of last execution of any script (8 Replies)
Discussion started by: arghya_owen
8 Replies

8. UNIX for Dummies Questions & Answers

time taken for execution

how much time a particular command or shell script executed there is any command to know this thanks (5 Replies)
Discussion started by: tsurendra
5 Replies

9. Shell Programming and Scripting

To take script execution time

Hello Guys, I would like to know is there a way to take the script execution time For e.g i am having a script.sh i need to write inside he script.sh like Start time : 10-Mar-2016 02:30:35 all code over here ... End time : 10-Mar-2016 03:30:32 Script start time - 02:30:35 ... (7 Replies)
Discussion started by: Master_Mind
7 Replies

10. Shell Programming and Scripting

Need to reduce the execution time

We are trying to execute below script for finding out the occurrence of a particular word in a log file Need suggestions to optimize the script. Test.log size - Approx to 500 to 600 MB $wc -l Test.log 16609852 Test.log po_numbers - 11 to 12k po's to search $more po_numbers xxx1335... (10 Replies)
Discussion started by: KumarPiyush7225
10 Replies
pud-faq(7)							  MISCELLANEOUS 							pud-faq(7)

  NAME
	  pud-faq - faqs and facts about the Portable Unix Documentation FAQ authoring language.

	  This	document  describes  the Portable Unix Documentation (PUD) faq mini-language in the style of a FAQ. PUD-faq is built on top of the
	  macro interpreter zoem. A PUD document is generally well-structured, relatively free of formatting statements, compact to write and eas-
	  ily  extendable.  It	can  be converted to both troff and html, for viewing in terminals and browsers. High quality Postscript and plain
	  text formats can be derived from the troff output. Refer to pud-man for examples.

  DESCRIPTION
	  The PUD faq macros extend the PUD manual macros; a PUD faq document must import both man.zmm and faq.zmm. There are  only  a	few  addi-
	  tional faq macros in faq.zmm. The overall layout of a faq document is as follows:

	  import{man.zmm}
	  import{faq.zmm}

	  egin{pud::man}{
	     {name}{pud-faq}
	     {html_title}{The PUD faq mini-language FAQ}
	     {author}{Stijn van Dongen}
	     {section}{7}
	  }

	  "faq::preamble"

	  ${html}{"man::maketoc"}

	  sec{toc}{TOC}
	  "faq::maketoc"

	  egin{faqsec}{{ref}{Labelx}{cap}{Captionx}}
	     content
	  end{faqsec}

	  egin{faqsec}{{ref}{Labely}{cap}{Captiony}}
	     content
	  end{faqsec}

	  end{pud::man}

	  The PUD manual macros are documented in the pud-man manual page.

	  Create your FAQ according to the lay-out above and as described further below. Refer to Question 2.3 for full-size examples.

	  Once you have written your FAQ, process it as follows.

	     zoem -i your-faq.azm -d html
	     zoem -i your-faq.azm -d html
	     zoem -i your-faq.azm -d roff -o your-faq.7
	     zoem -i your-faq.azm -d roff -o your-faq.7

	  This generates files your-faq.html and your-faq.7.  Each device is run twice to be certain that references are found and linked.

  RESOURCES
	  o The Zoem User Manual.
	  o The pud-man manual page.

  TOC
  1...... How do I create and link to questions and sections?
   1.1... How do I start a section?
   1.2... How do I make a faq entry?
   1.3... How do I link to a question?
   1.4... How do I link to a section?
   1.5... Is that not a whole lot of typing just for linking?

  2...... Miscellaneous
   2.1... Is it really possible to have more than one section?
   2.2... Is there an easy way to get back to the TOC?
   2.3... Show me a real FAQ, not this nonsense.
   2.4... I want to change the appearance of my FAQ.
   2.5... Show me the source to this FAQ.

  FAQ
						    How do I create and link to questions and sections?

   1.1	  How do I start a section?

	  You would for example type

	  egin{faqsec}{
	     {ref}{kind}
	     {cap}{How do I link to questions and sections?}
	  }

   1.2	  How do I make a faq entry?

	  You create an entry as follows:

	  faq{q_question}{How do I make a faq entry?}
	     You create an entry as follows:
	     ...

   1.3	  How do I link to a question?

	  car{Like this: linking to
	  iref{q_qlink}{Question~
efnumber{q_qlink}},
	  or a silly link to the iref{q_qlink}{current question}.
	  Linking to iref{s_basics}{Question~
efnumber{q_slink}},
	  or a link to the iref{q_slink}{next question}.}

	  par{
	  Of course, you have to use wordings such that the
	  text still makes sense in the absence of links
	  (assuming you are intested in the troff version of
	  the FAQ you are writing), so normally you just refer to
	  iref{q_slink}{Question~
efnumber{q_slink}} and be done
	  with it.}

	  Like this: linking to Question 1.3, or a silly link to the current question.	Linking to Question 1.4, or a link to the next question.

	  Of course, you have to use wordings such that the text still makes sense in the absence of links (assuming you are intested in the troff
	  version of the FAQ you are writing), so normally you just refer to Question 1.4 and be done with it.

   1.4	  How do I link to a section?

	  car{Like this: linking to
	  iref{q_qlink}{Section~
efnumber{s_basics}} and
	  linking to iref{q_stupid}{Section~
efnumber{s_stupid}}.}

	  Like this: linking to Section 1 and linking to Section 2.

   1.5	  Is that not a whole lot of typing just for linking?

	  It sure is. Note the repeating elements though. Feel free to create your own shortcuts by using Zoem's macro facilities.

								       Miscellaneous

   2.1	  Is it really possible to have more than one section?

	  QED

   2.2	  Is there an easy way to get back to the TOC?

	  In the HTML version of the faq, one can click on the number to the left of the question; this will take you to the top of the  TOC  part
	  pertaining to the section that question belongs to.

   2.3	  Show me a real FAQ, not this nonsense.

	  The  reason I began writing zoem and PUD was that I wanted decent (both HTML and troff) and easy to write documentation for my implemen-
	  tation of the MCL cluster algorithm.

	  o http://micans.org/mcl/src/mcl-latest/doc/mclfaq.azm
	  o http://micans.org/mcl/src/mcl-latest/doc/mclfaq.html
	  o http://micans.org/mcl/src/mcl-latest/doc/mclfaq.ps

   2.4	  I want to change the appearance of my FAQ.

	  Well, you need to make a copy of the faq macros and possibly the man macros, and hack those changes in.  Zoem itself is  very  flexible,
	  but  the  PUD faq macros are not, in this respect. They can be made so, if you wish.	If you just want to change or add some style sheet
	  rules for the HTML version, it will be quite easy.  The same holds for changing font styles and possibly even spacing rules.

   2.5	  Show me the source to this FAQ.

	  Search for pud-faq.azm in your install of zoem.  Take note though that I played a few silly tricks in this FAQ, so the source looks more
	  unreadable than your average FAQ.  The FAQ pointed to in Answer 2.3 gives a more realistic impression.

  AUTHOR
	  Stijn van Dongen.

  SEE ALSO
	  The pud-man manual page, documenting the PUD manual language. The FAQ language imports the manual definitions and you use these e.g. for
	  sectioning commands as described above.

	  The pud manual page gives an overview of PUD.

  pud-faq 1.002, 10-008 					      8 Jan 2010							  pud-faq(7)
All times are GMT -4. The time now is 04:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy