blob: 18a48a6dd6eba6c43537429a415c9d55a82adbe8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# Copyright (C) 2024-2026 Maria Lisina
# Copyright (C) 2024-2026 Danil Lisin
# SPDX-License-Identifier: Apache-2.0
if ! mkdir "${cache}.lock"
then
exit 0
fi
timer_ctime=$(strftime %s)
timer_mtime=$(< "${cache}.timer")
if [[ $((timer_ctime - timer_mtime)) -lt 5 ]]
then
rmdir "${cache}.lock"
exit 0
fi
source "${submods}/timer_unlock.zsh"
source "${submods}/timer_uncache.zsh"
strftime %s > "${cache}.timer"
rmdir "${cache}.lock"
|