Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Is it possible to pause the dxl program
Topic Summary:
Created On: 4-May-2004 19:49
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 4-May-2004 19:49
User is offline View Users Profile Print this message


Adam Terrenzio

Posts: 14
Joined: 24-Nov-2003

Is there a function such as sleep that can be used to pause the dxl program for certain amount of time?

Thanks!
Report this to a Moderator Report this to a Moderator
 4-May-2004 21:04
User is offline View Users Profile Print this message


Ross Morgan

Posts: 74
Joined: 15-Apr-2004

sleep_(int milliseconds)
not documented/supported

why do you want to pause the DXL execution? (perhaps there is another way to do this)
Report this to a Moderator Report this to a Moderator
 5-May-2004 21:06
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Cannot find "sleep_" and it generates DXL errors.

I've got a function that sleeps for seconds at a time. Attached. I think I stole it from Gallion.

- Louie
Report this to a Moderator Report this to a Moderator
 5-May-2004 21:09
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

If you are looking for a infinate pause you can define a dialog and then "block" it rather than "show" it. When the dialog is closed your DXL resumes after the "block" command. You can thus have a dialog box that behaves like an "ack" or "confirm".

- Louie
Report this to a Moderator Report this to a Moderator
 10-May-2004 20:22
User is offline View Users Profile Print this message


Adam Terrenzio

Posts: 14
Joined: 24-Nov-2003

Basically, I need to 'pause' the execution of the dxl program until a certain file gets created in the file system but I don't want to constantly have to check if the file has been created as it slows down the program...
I would rather pause for a couple of seconds, then check, and so on..

Here is the piece of code that checks whether the file has been created:
// wait until the file done.txt has been created
Stat st = create "done.txt"
while (null st){
(I would like to be able to pause here for a couple of seconds)
st = create idsfileNamebool
}
delete st

Report this to a Moderator Report this to a Moderator
 30-Sep-2006 02:20
User is offline View Users Profile Print this message


Andrew Wallen

Posts: 18
Joined: 23-Sep-2006

Excellent routine. I don't suppose you've found any way to sleep for sub-second amounts of time? My problem is that I need to wait for a system call (which only takes ~100 ms) to finish executing. I can throw doors in a waiting loop but then my system call takes even longer as it becomes resource starved. Using the code you attached does get rid of the 100% processor usage, but since my calls should only take ~100ms, it is pretty painful to accept a factor of 10 degradation in performance. It really seems that telelogic really should provide some type of native sleep or wait call, There seem to be a lot of doors functions (both user and built-in) that could use it to cut down on their excessively high processor usage. Nevermind sleep_ (int n) //n in milliseconds works fine in doors 8.1

Edited: 30-Sep-2006 at 02:42 by Andrew Wallen
Report this to a Moderator Report this to a Moderator
 30-Sep-2006 09:56
User is offline View Users Profile Print this message


Pekka Mäkinen

Posts: 276
Joined: 18-Mar-2004

In similar situations I have used empty loop to stop the program execution for some time.

-------------------------
Pekka.Makinen@softqa.fi
SoftQA Oy -http://www.softqa.fi/
Report this to a Moderator Report this to a Moderator
 3-Oct-2006 13:42
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

See the following thread:

Wait

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 13-Oct-2006 14:43
User is offline View Users Profile Print this message


Al Lione

Posts: 59
Joined: 13-Jul-2004

if you don't mind some user interaction, you can always use this: if (confirm "continue program?") ; else ;
Report this to a Moderator Report this to a Moderator
 17-Oct-2006 23:12
User is offline View Users Profile Print this message


Chris Jones

Posts: 177
Joined: 1-Jul-2005

Someone here came up with this handy method:

Date d1 = today()
Date d2 = today()
while ((intOf d2) - (intOf d1) < 3) // 3 second delay
d2 = today()


You can of course package it up into a function, etc....
Report this to a Moderator Report this to a Moderator
 18-Oct-2006 17:35
User is offline View Users Profile Print this message


Chris Raplee

Posts: 15
Joined: 26-Sep-2006

quote:

Originally posted by: Chris Jones
Someone here came up with this handy method: Date d1 = today() Date d2 = today() while ((intOf d2) - (intOf d1) < 3) // 3 second delay d2 = today() You can of course package it up into a function, etc....


That's nifty but probably inferior to a sleep call -- the reason being that a sleep is going to give the remainder of your processor slice back to the OS while the routine you posted is going to sit there evaluating today(), coercing dates into integers, and doing some subtraction for a whole timeslice.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 0 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.