The LimeSurvey Fund-Raiser 2012 is complete. Thank you for donating a total of 25,000 USD!     List of donors »

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Measuring time in milliseconds

Measuring time in milliseconds 2 months 1 week ago #93871

Hello everyone!
LimeSurvey saves time of answering to each question in seconds. I was wondering if there is possibility to measure time in milliseconds?
Thank you!
The administrator has disabled public write access.

Measuring time in milliseconds 2 months 6 days ago #93898

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2869
  • Thank you received: 428
  • Karma: 246
Not "out of the box".

You could add a question to every group and use JavaScript to hide them and load the exact time between page load and submit click.
Cheers,
Tony

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Measuring time in milliseconds 2 months 6 days ago #93941

  • helper
  • helper's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 126
  • Thank you received: 17
  • Karma: 0
Open .../application/controllers/admin/responses.php
find the following:
                    $minutes = (int) ($browsedatafield[$i] / 60);
                    $seconds = $browsedatafield[$i] % 60;
                    $browsedatafield[$i] = '';
                    if ($minutes > 0)
                        $browsedatafield[$i] .= "$minutes min ";
                    $browsedatafield[$i] .= "$seconds s";
replace with:
                    $minutes = (int) ($browsedatafield[$i] / 60);
                    $seconds = $browsedatafield[$i] % 60;
                    $ms = $browsedatafield[$i] % 1000;
                    $browsedatafield[$i] = '';
                    if ($minutes > 0)
                        $browsedatafield[$i] .= "$minutes min ";
                    $browsedatafield[$i] .= $seconds.".".$ms." s";
The administrator has disabled public write access.

Measuring time in milliseconds 2 months 5 days ago #93993

  • helper
  • helper's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 126
  • Thank you received: 17
  • Karma: 0
Better:
                    $minutes = $browsedatafield[$i] / 60;
                    $min = (int) $minutes;
                    $seconds = sprintf("%.2f",($minutes - $min) * 60);
                    $browsedatafield[$i] = '';
                    if ($minutes > 0)
                        $browsedatafield[$i] .= $min."m ";
                    $browsedatafield[$i] .= $seconds."s ";
The administrator has disabled public write access.

Measuring time in milliseconds 2 months 4 days ago #94053

Thank you a lot!
The administrator has disabled public write access.

Measuring time in milliseconds 2 months 4 days ago #94063

  • helper
  • helper's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 126
  • Thank you received: 17
  • Karma: 0
Glad that things worked out for you... just a word of caution though - If you do an update to your LimeSurvey, the changes that you made to the file may be overwritten.
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: DenisChenu, ITEd
Time to create page: 0.395 seconds
Donation Image