Skip to content

Commit

Permalink
Always record time_elapsed in seconds (#368)
Browse files Browse the repository at this point in the history
* Always record time_elapsed in seconds

* Guess the PR numbers again
  • Loading branch information
trestletech committed May 13, 2020
1 parent 1688820 commit cf5fe34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ learnr (development version)

## Bug fixes

* Properly enforce time limits exceeding 60 seconds. ([#365](https://github.com/rstudio/learnr/pull/365))
* Properly enforce time limits and measure exercise execution times that exceed 60 seconds ([#366](https://github.com/rstudio/learnr/pull/366), [#368](https://github.com/rstudio/learnr/pull/368))

learnr 0.10.1
===========
Expand Down
2 changes: 1 addition & 1 deletion R/exercise.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ setup_exercise_handler <- function(exercise_rx, session) {
code = exercise$code,
output = result$html_output,
timeout_exceeded = result$timeout_exceeded,
time_elapsed = as.numeric(Sys.time() - start),
time_elapsed = as.numeric(difftime(Sys.time(), start, units="secs")),
error_message = result$error_message,
checked = !is.null(exercise$code_check) || !is.null(exercise$check),
feedback = result$feedback
Expand Down

0 comments on commit cf5fe34

Please sign in to comment.