#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.

  • Guest
  • Apr 22 2020
  • Under Consideration
  • Attach files
  • Guest commented
    19 May, 2020 08:56pm

    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.

  • Guest commented
    15 May, 2020 08:35am

    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"

  • Guest commented
    27 Apr, 2020 04:29pm

    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.

  • Guest commented
    24 Apr, 2020 02:33pm

    You could use this method