timpunch (debug aid)
gTimePunch is a public variable which is taken from defines.timepunch during system start.
After the installaton of Tool&Task, timepunch is set to .f. in defines.dbf. You can change the setting using m_sysdef. The change will be in effect after the next start of Tool&Task
All the executables of Tool&Task use a procedure TimePunch(text, origin) to document the time and the executable which sent the string. All strings end up in the file >gUserDataTT<temp\fox_dll.txt
if gTimepunch in ON (=set to 1), this file can grow markedly. m_sysdef has settings to truncate the file at the end of a session. If the file is not used for 2 days, it is deleted anyhow. (When gTimePunch is set to OFF).
The form m_watchfile (start using menue item Miscellaneous) allows to edit this file and to directly send parts to the Tool&Task Team.
Example
19:00:28.3131 T&T: 92479808 image 1 coords x=10, y=406, w=74, h=61
19:00:28.3434 T&T: 92483728 ttret(hg_thumbnail) =9014, X=10, Y=416, w=74, h=40
19:00:28.3807 T&T: 159760768 enter shapeclick for shape 2
19:00:28.3812 T&T: 159760768 set Thisform.nextdetail to 2
19:00:32.8515 T&T: 160485880 OPN: m_getbox
19:00:56.1397 T&T: 160489976 CLS: m_getbox
19:01:49.7485 T&T: 167003632 image 1 coords x=10, y=406, w=74, h=61
19:01:49.7734 T&T: 166974784 ttret(hg_thumbnail) =6154, X=30, Y=406, w=33, h=61
19:01:49.8093 T&T: 166982976 enter shapeclick for shape 2
19:01:49.8099 T&T: 166982976 set Thisform.nextdetail to 2
19:02:01.5674 T&T: 98858064 CLS: m_bmpview
Main reasons for TimePunch are:
1. | To have a debug procedure. When problems occur the Tool&Task team will add messages to the respective program. |
2. | To see whether the used memory of the program at each message are in accordance with the memory allocated in the dll's. Caution: since FoxPro has an own thread managing the allocated memory, you cannot expect to see the exactly same memory in use, when a form closes! |
3. | To be able to check the duration of procedures. The Windows® QueryPerformanceCounter is used and synchronized to the full second of time() |