lib/Time/timegm.xs

filter: Statementstmt 100% 10 / 10 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 91.6% 11 / 12 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/Time/timegm.pm ↑ Summary
1 /* You may distribute under the terms of either the GNU General Public License
2 * or the Artistic License (the same terms as Perl itself)
3 *
4 * (C) Paul Evans, 2012 -- leonerd@leonerd.org.uk
5 */
6  
7 #include "EXTERN.h"
8 #include "perl.h"
9 #include "XSUB.h"
10  
11 MODULE = Time::timegm PACKAGE = Time::timegm
12  
13 int
14 timegm(sec,min,hour,mday,mon,year,wday=0,yday=0,isdst=-1)
15 int sec
16 int min
17 int hour
18 int mday
19 int mon
20 int year
21 int wday
22 int yday
23 int isdst
24 PREINIT:
25 struct tm tm;
26 CODE:
27 16 tm.tm_sec = sec;
28 16 tm.tm_min = min;
29 16 tm.tm_hour = hour;
30 16 tm.tm_mday = mday;
31 16 tm.tm_mon = mon;
32 16 tm.tm_year = year;
33 16 tm.tm_wday = wday;
34 16 tm.tm_yday = yday;
35 16 tm.tm_isdst = isdst;
36 #if defined(HAVE_TIMEGM)
37 16 ▶ RETVAL = timegm(&tm);
Branch: 1 branch
BranchTrueFalseTotal
RETVAL = timegm(&tm); 0 16 16
38 #elif defined(HAVE_MKGMTIME)
39 RETVAL = _mkgmtime(&tm);
40 #else
41 croak("timegm() not available");
42 #endif
43 OUTPUT:
44 RETVAL
« blib/lib/Time/timegm.pm ↑ Summary