1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-06 11:57:57 +00:00

refactor: standardize epoch time retrieval with get_epoch_seconds and ensure locale-independent string transformations.

This commit is contained in:
Tw93
2026-01-03 18:07:47 +08:00
parent 4efe1411aa
commit 6dfd675417
15 changed files with 79 additions and 41 deletions

View File

@@ -590,9 +590,9 @@ opt_spotlight_index_optimize() {
local slow_count=0
local test_start test_end test_duration
for _ in 1 2; do
test_start=$(date +%s)
test_start=$(get_epoch_seconds)
mdfind "kMDItemFSName == 'Applications'" > /dev/null 2>&1 || true
test_end=$(date +%s)
test_end=$(get_epoch_seconds)
test_duration=$((test_end - test_start))
if [[ $test_duration -gt 3 ]]; then
((slow_count++))