Skip to content

Commit 3b2275c

Browse files
authored
Remove dependency on Libc.TimeVal by directly calling time() instead. (#679)
Co-authored-by: Sukera <[email protected]>
1 parent ca3b5cf commit 3b2275c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/utils.jl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,16 @@ function pushex!(exsigs::ExprsSigs, ex::Expr)
108108
end
109109

110110
## WatchList utilities
111-
function systime()
112-
# It's important to use the same clock used by the filesystem
113-
tv = Libc.TimeVal()
114-
tv.sec + tv.usec/10^6
115-
end
116111
function updatetime!(wl::WatchList)
117-
wl.timestamp = systime()
112+
wl.timestamp = time()
118113
end
119114
Base.push!(wl::WatchList, filenameid::Pair{<:AbstractString,PkgId}) =
120115
push!(wl.trackedfiles, filenameid)
121116
Base.push!(wl::WatchList, filenameid::Pair{<:AbstractString,PkgFiles}) =
122117
push!(wl, filenameid.first=>filenameid.second.id)
123118
Base.push!(wl::WatchList, filenameid::Pair{<:AbstractString,PkgData}) =
124119
push!(wl, filenameid.first=>filenameid.second.info)
125-
WatchList() = WatchList(systime(), Dict{String,PkgId}())
120+
WatchList() = WatchList(time(), Dict{String,PkgId}())
126121
Base.in(file, wl::WatchList) = haskey(wl.trackedfiles, file)
127122

128123
@static if Sys.isapple()

0 commit comments

Comments
 (0)