diff options
author | sebres <sebres@users.sourceforge.net> | 2017-01-10 22:07:37 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2017-01-10 22:07:37 (GMT) |
commit | efcfa2b368fa979b75f62e91ae673b260f2ba0c9 (patch) | |
tree | a653abcdf8c8acb4fa58a6394ee760741b36ec52 /generic/tclDate.h | |
parent | c093e76184fc3101487abf86878fcc8e85a77cd9 (diff) | |
download | tcl-efcfa2b368fa979b75f62e91ae673b260f2ba0c9.zip tcl-efcfa2b368fa979b75f62e91ae673b260f2ba0c9.tar.gz tcl-efcfa2b368fa979b75f62e91ae673b260f2ba0c9.tar.bz2 |
[temp-commit]: tclClockFmt.c - 1st try
using "timerate" instead "time" by performance measurement tests (more precise and fixed time, so no switch of factor expected)
Diffstat (limited to 'generic/tclDate.h')
-rw-r--r-- | generic/tclDate.h | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/generic/tclDate.h b/generic/tclDate.h index 6ba9620..c3c362a 100644 --- a/generic/tclDate.h +++ b/generic/tclDate.h @@ -66,13 +66,55 @@ typedef enum _MERIDIAN { } MERIDIAN; /* + * Clock scan and format facilities. + */ + +#define CLOCK_FMT_SCN_STORAGE_GC_SIZE 32 + + +typedef struct ClockFormatToken ClockFormatToken; +typedef struct ClockScanToken ClockScanToken; +typedef struct ClockFmtScnStorage ClockFmtScnStorage; + +typedef struct ClockFormatToken { + ClockFormatToken *nextTok; +} ClockFormatToken; + +typedef struct ClockScanToken { + ClockScanToken *nextTok; +} ClockScanToken; + +typedef struct ClockFmtScnStorage { + int objRefCount; /* Reference count shared across threads */ + ClockScanToken *firstScnTok; + ClockFormatToken *firstFmtTok; +#if CLOCK_FMT_SCN_STORAGE_GC_SIZE > 0 + ClockFmtScnStorage *nextPtr; + ClockFmtScnStorage *prevPtr; +#endif +/* +Tcl_HashEntry hashEntry /* ClockFmtScnStorage is a derivate of Tcl_HashEntry, + * stored by offset +sizeof(self) */ +} ClockFmtScnStorage; + +typedef struct ClockLitStorage { + int dummy; +} ClockLitStorage; + +/* * Prototypes of module functions. */ MODULE_SCOPE time_t ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian); -MODULE_SCOPE int TclClockFreeScan(Tcl_Interp *interp, DateInfo *info); +MODULE_SCOPE int TclClockFreeScan(Tcl_Interp *interp, DateInfo *info); + +/* tclClockFmt.c module declarations */ + +MODULE_SCOPE ClockFmtScnStorage * + Tcl_GetClockFrmScnFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr); + /* * Other externals. |