Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2012
    Location
    Huntsville, AL
    Posts
    379
    Provided Answers: 2

    Unanswered: Show Message and Time Elapsed Questions

    One of the functions contained within my project is a detailed facility-wide examination requiring information from several folders. This process takes several seconds to loop through the thousands of possibilities to arrive at the answer. As soon as the code execution is complete a generic 'message' appears informing the user of how the values were computed (this message does NOT require any data from the analysis that just has been run). Here are my questions:

    Question 1). Is it possible to have the 'message' appear as soon as the button is clicked AND for the program to continue running the scripting? The scripting ceases to continue processing when a 'show message' is encountered and resumes processing once one of the buttons (Ok, Cancel, Yes, No,... etc) is pressed. I am looking at this in terms of efficiency - by the time the user has finished reading the message, the scripting would already be finished if it could run concurrently. I have never seen any method to do this so it is probably safe to assume that it is not possible. However, there are some really knowledgeable people here who know no boundaries and have created some amazing things with Brilliant Database so it is worthwhile to ask!

    Question 2). I am interested in measuring the time elapsed from the instance a button was pressed to start some scripting to the time the last line of scripting was executed. I looked into the 'timers' in Brilliant Database and that is not what I need. My final line of script would simply be for a message to appear with x.xxx seconds as the output. This will not appear as part of the final project, instead I need to evaluate if my changes to the scripting is increasing or decreasing the efficiency/speed of the calculations being performed. Can Brilliant Database measure time with 0.000 precision?
    Daryl G

  2. #2
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi Daryl
    A couple of ideas. The notification action is not modal and allows normal operations but the size of text area may be limiting. Might it be possible to create a form with no fields and only text to display your message (force "form only" command in script) - assuming it is compatible with script (for each record cycle should work).
    The second question - should be possible by setting globals to current time at beginning of script and again at end. A calculation to give difference should show seconds but only to hundreths of seconds.
    Regards
    David

  3. #3
    Join Date
    Jan 2014
    Posts
    46
    If you use the system [$_timer] variable your time elapsed will show 14 digits to the right of the decimal. They change each time so I am guessing they are accurate.
    Don

  4. #4
    Join Date
    Dec 2012
    Location
    Huntsville, AL
    Posts
    379
    Provided Answers: 2
    David,
    That is an interesting idea with using the 'show notifications'. At first, I had no idea what this was as I have never even noticed it. I then tested it and quickly see what you mean about the the limits of the text area... I have a full paragraph that the user should read and that area offered by the 'show notification' is too small; however, I am going to save that idea because with the 'show notification' is not subject to the same message box modality, this could certainly be useful in other projects.

    The system variables are something I have, also, never used. It certainly looks like it already has what I need to capture the time required. Accuracy of hundredths of a second should work for what I need. Many thanks David!!!

    What part of Australia is home? I was in Darwin back in 1991 (I was in the Unity States Navy) and really loved your country.
    Daryl G

  5. #5
    Join Date
    Dec 2012
    Location
    Huntsville, AL
    Posts
    379
    Provided Answers: 2
    Don,
    You are right on target! I used the [$_timer] to set the initial start time and again to set the end time. I set one more variable to subtract these two values and viola! I have the answer. It looks as if the [$_timer] counts seconds from midnight to two decimal places; however, subtracting the start timer from the end timer goes out to a (stated) precision of 14 decimal places. This is exactly what I was looking for. I certainly thank you for your guidance and help!
    Daryl G

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •