I hope this gets you on the right track 
# Function for creating random time points
get_time_points = function(start = "2018-01-01", end = "2018-01-02", n = 100){
x = sample(seq(as.POSIXct(start), as.POSIXct(end), by = "mins"), n)
return(x)
}
# Create dummy data
d = data.frame(arrive = get_time_points(), leave = get_time_points())
d$stay = difftime(d$arrive, d$leave, units = "mins")
# Annotate stay
d$duration = ifelse(d$stay > 60, "Long", ifelse(d$stay > 30, "Medium", "Short"))