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: "wait" function and microtime??
Topic Summary:
Created On: 27-Mar-2008 20:05
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.
 27-Mar-2008 20:05
User is offline View Users Profile Print this message


David Jakad

Posts: 94
Joined: 20-Jul-2007

Here is a simple "wait" function:

void fnWait(int xSec) {
int xDone = intOf(today)+xSec
while(intOf(today)<xDone) {
// Do nothing
}
}

So, fnWait(5) will wait approximately 5 seconds. However, it's only approximate. fnWait(1) will wait between 0 and 1 second, since it depends on exactly when the first time stamp (xDone) was taken. In other languages, there is something like "microtime", which will give some time stamp with the seconds out to several decimal points. Is there anything similar in DXL so one could build a more accurate wait function?
Report this to a Moderator Report this to a Moderator
 28-Mar-2008 09:54
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

try:

void sleep_(int milliseconds)
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 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 1 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.