Lines Matching +full:timeout +full:- +full:minutes
1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
39 * Timeout interval is by default TIMEOUT, it can be changed with
40 * an argument of the form -time where time is in minutes
65 #define TIMEOUT 15 macro
72 static struct timeval timeout; variable
75 static long nexttime; /* keep the timeout time */
97 sectimeout = TIMEOUT; in main()
103 while ((ch = getopt(argc, argv, "npt:v")) != -1) in main()
107 errx(1, "illegal timeout value"); in main()
124 timeout.tv_sec = sectimeout * 60; in main()
126 if (!usemine) { /* -p with PAM or S/key needs privs */ in main()
143 tzn = timp->tm_zone; in main()
151 pam_err = pam_start("lock", pw->pw_name, &pamc, &pamh); in main()
181 ntimer.it_value = timeout; in main()
191 if (ioctl(0, VT_LOCKSWITCH, &vtylock) == -1) { in main()
200 (void)printf("lock: %s using %s on %s.", pw->pw_name, in main()
205 (void)printf(" no timeout."); in main()
207 (void)printf(" timeout in %d minute%s.", sectimeout, in main()
261 (void)fprintf(stderr, "usage: lock [-npv] [-t timeout]\n"); in usage()
275 (void)printf("timeout in %jd:%jd minutes\n", in hi()
276 (intmax_t)(nexttime - timval) / 60, in hi()
277 (intmax_t)(nexttime - timval) % 60); in hi()
298 (void)printf("lock: timeout\n"); in bye()