time.c revision 1515
561N/A * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 837N/A * Permission is hereby granted, free of charge, to any person obtaining a 561N/A * copy of this software and associated documentation files (the "Software"), 561N/A * to deal in the Software without restriction, including without limitation 561N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense, 561N/A * and/or sell copies of the Software, and to permit persons to whom the 561N/A * Software is furnished to do so, subject to the following conditions: 561N/A * The above copyright notice and this permission notice (including the next 561N/A * paragraph) shall be included in all copies or substantial portions of the 561N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 561N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 561N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 561N/A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 561N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 561N/A * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 561N/A * DEALINGS IN THE SOFTWARE. 561N/A * This compiles to a module that can be preloaded during a build. If this 561N/A * is preloaded, it interposes on time(2), gettimeofday(3C), and 561N/A * clock_gethrtime(3C) and returns a constant number of seconds since epoch 561N/A * when the execname matches one of the desired "programs" and TIME_CONSTANT 561N/A * contains an integer value to be returned. 837N/A/* The list of programs that we want to use a constant time. */ 911N/Astatic char *
programs[] = {
"autogen",
"bash",
"cpp",
"cc1",
"date",
"doxygen",
911N/A "erl",
"javadoc",
"ksh",
"ksh93",
"ld",
"perl",
"perl5.8.4",
"perl5.10",