xref: /netbsd-src/external/mpl/bind/dist/bin/tests/system/cds/checkmtime.pl (revision 9fb66d812c00ebfb445c0b47dea128f32aa6fe96)
1#!/usr/bin/perl
2#
3# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
4#
5# This Source Code Form is subject to the terms of the Mozilla Public
6# License, v. 2.0. If a copy of the MPL was not distributed with this
7# file, you can obtain one at https://mozilla.org/MPL/2.0/.
8#
9# See the COPYRIGHT file distributed with this work for additional
10# information regarding copyright ownership.
11
12my $target = shift;
13my $file = shift;
14my $mtime = time - (stat $file)[9];
15die "bad mtime $mtime"
16	unless ($mtime - $target >= 0 && $mtime - $target < 60);
17