Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Enchufa2 committed Jul 15, 2022
1 parent 3149972 commit ad8ea86
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ Depends: R (>= 3.1.2)
Imports: Rcpp, magrittr, codetools, utils
Suggests: simmer.plot, parallel, testthat, knitr, rmarkdown, rticles
LinkingTo: Rcpp (>= 0.12.9), BH (>= 1.62.0-1)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.0
Roxygen: list(old_usage = TRUE)
VignetteBuilder: knitr
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ S3method(stop_if,trajectory)
S3method(synchronize,trajectory)
S3method(timeout,trajectory)
S3method(timeout_from_attribute,trajectory)
S3method(timeout_from_global,trajectory)
S3method(trap,trajectory)
S3method(untrap,trajectory)
S3method(wait,trajectory)
Expand Down
2 changes: 1 addition & 1 deletion R/trajectory-activities.R
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ timeout_from_attribute.trajectory <- function(.trj, key) {
timeout_from_global <- function(.trj, key) UseMethod("timeout_from_global")

#' @export
timeout_from_global <- function(.trj, key) {
timeout_from_global.trajectory <- function(.trj, key) {
check_args(key="character")

add_activity(.trj, Timeout__new_attr(key, TRUE))
Expand Down
3 changes: 2 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ is_trajectory <- function(name, env) {

get_caller <- function(max.depth=10) {
for (i in seq_len(max.depth)) {
fun <- as.character(sys.call(-i-1)[[1]])
if (!length(fun <- as.character(sys.call(-i-1)[[1]])))
break # end of the stack
if (grepl("\\.(simmer|trajectory)$", fun))
return(strsplit(fun, ".", fixed=TRUE)[[1]][1])
}
Expand Down

0 comments on commit ad8ea86

Please sign in to comment.