-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apc_time: convert apc_time() to function
- Loading branch information
1 parent
8b321d8
commit f12b0de
Showing
4 changed files
with
53 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
+----------------------------------------------------------------------+ | ||
| APC | | ||
+----------------------------------------------------------------------+ | ||
| Copyright (c) 2006-2011 The PHP Group | | ||
+----------------------------------------------------------------------+ | ||
| This source file is subject to version 3.01 of the PHP license, | | ||
| that is bundled with this package in the file LICENSE, and is | | ||
| available through the world-wide-web at the following url: | | ||
| http://www.php.net/license/3_01.txt | | ||
| If you did not receive a copy of the PHP license and are unable to | | ||
| obtain it through the world-wide-web, please send a note to | | ||
| [email protected] so we can mail you a copy immediately. | | ||
+----------------------------------------------------------------------+ | ||
This software was contributed to PHP by Community Connect Inc. in 2002 | ||
and revised in 2005 by Yahoo! Inc. to add support for PHP 5.1. | ||
Future revisions and derivatives of this source code must acknowledge | ||
Community Connect Inc. as the original contributor of this module by | ||
leaving this note intact in the source code. | ||
All other licensing and usage conditions are those of the PHP Group. | ||
*/ | ||
|
||
#include "apc_time.h" | ||
#include "apc_globals.h" | ||
#include "SAPI.h" | ||
|
||
time_t apc_time(void) | ||
{ | ||
if (APCG(use_request_time)) { | ||
if (!APCG(request_time)) | ||
APCG(request_time) = (time_t) sapi_get_request_time(); | ||
return APCG(request_time); | ||
} else { | ||
return time(0); | ||
} | ||
} | ||
|
||
/* | ||
* Local variables: | ||
* tab-width: 4 | ||
* c-basic-offset: 4 | ||
* End: | ||
* vim>600: noexpandtab sw=4 ts=4 sts=4 fdm=marker | ||
* vim<600: noexpandtab sw=4 ts=4 sts=4 | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters