if (interactive()) {
library(shiny)
shinyApp(
ui = fluidPage(
shinyTimer("timer", label = "Count Up Timer", seconds = 0, type = "mm:ss.cs"),
actionButton("start", "Start Counting Up")
),
server = function(input, output, session) {
observeEvent(input$start, {
countUp("timer")
})
}
)
}
Run the code above in your browser using DataLab