Changeset 7961 for trunk/psLib/src/astro/psTime.c
- Timestamp:
- Jul 24, 2006, 3:16:04 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psTime.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psTime.c
r7942 r7961 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.9 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-07-2 0 12:59:07$12 * @version $Revision: 1.92 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-07-25 01:16:04 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1681 1681 } 1682 1682 1683 psString psTimeStrftime(const psTime *time, const char *format) 1684 { 1685 PS_ASSERT_PTR_NON_NULL(time, NULL); 1686 PS_ASSERT_PTR_NON_NULL(format, NULL); 1687 1688 struct tm *tmTime = psTimeToTM(time); 1689 1690 psString s = psAlloc(MAX_TIME_STRING_LENGTH); 1691 size_t size = strftime(s, MAX_TIME_STRING_LENGTH, format, tmTime); 1692 psFree(tmTime); 1693 // it's worth nothing that strftime() can zero without an error having 1694 // occured don't believe it's worth supporting that edge case. See 1695 // strftime(3) for further details. 1696 if (size == 0) { 1697 psError(PS_ERR_UNKNOWN, true, "failed to stringify a psTime"); 1698 return NULL; 1699 } 1700 1701 return s; 1702 } 1703 1683 1704 psTime* psTimeMath(const psTime *time, 1684 1705 double delta)
Note:
See TracChangeset
for help on using the changeset viewer.
