#dominoforever | Product Ideas Portal

 

Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.

For more information and upcoming events around #dominoforever, please visit our Destination Domino Page

Provide a way to record time more precisely than one second intervals in LotusScript

I would like to be able to time some of my code to improve the speed. However, Time, Timer and NotesDateTime will only return time in one second intervals. This is not really accurate enough to be useful.

I would like to be able to grab the time before and after my code executes and do the math and get results down to the millisecond.

  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Apr 22 2020
  • Likely to implement
  • Attach files
  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    19 May 20:56

    If your simple method is correct, then perhaps HCL can update the documentation. As of 11.0.1, the documentation states that Timer returns the elapsed time since midnight in seconds and that it is rounded to the nearest hundredth.

    In my own tests of your suggestion (I tried it maybe 10 times), the first time Timer is called, it always ends with .5000 which makes me question its accuracy.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    15 May 08:35

    There is also another simple method to measure time with inbuild functions:

    Dim dblStart AS Double

    dblStart = Timer

    ' Your code

    ' Output time needed in seconds but with milliseconds decimal places

    Print Format(Timer - dblStart, "0.000") & " s"

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    27 Apr 16:29

    Yes, I saw that method before I posted. I also found a Windows API call that I used. However it would be nice to have a built in method to use.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    24 Apr 14:33

    You could use this method