Page 1 of 2
Msecs "reloaded"
Posted: 06 Jun 2013 08:56
by Marco
Not exactly a wish, but...
I was wondering if msecs will get the documented status one day, and maybe be part of functions like report.
Oh, and if will also evolve in nsecs, so to support the full time resolution of NTFS

Re: Msecs "reloaded"
Posted: 06 Jun 2013 09:34
by admin
I'd like to do it but I wonder about the demand. Will it pass the
bloat filter? Give me a good reason to add it. Usage!

Re: Msecs "reloaded"
Posted: 06 Jun 2013 10:15
by Marco
Yup, you're right about the demand aspect and the bloat filter.
I can't think of "extremely good" reasons for nsecs, but a mildly good reason for wider implementation of msecs is: why crippling it to info panel only?
It clashes with the expectation of doing a thing (millisecond-accurate timestamping) regardless of the mean used (UI or scripting). For a carefully designed piece of software like XY, focused on usability, this should be enough a reason.
Well, on a second thought about nsecs...
1. You'd be the first to implement it

2. A possibility is not bloat. Software that do things outside their scope are bloated. Timestamping is file management. XYplorer is a file manager.
PS: should you ever accept the changelled and delve into it, this might help
http://vb.mvps.org/hardcore/html/filedatestimes.htm
Re: Msecs "reloaded"
Posted: 06 Jun 2013 16:32
by admin
You'd be the first to implement it...
You know which buttons to push...

I'll think about it. Currently busy with other tricky things...

Re: Msecs "reloaded"
Posted: 07 Jun 2013 12:16
by admin
Done.

Re: Msecs "reloaded"
Posted: 07 Jun 2013 12:49
by grindax
.
Re: Msecs "reloaded"
Posted: 07 Jun 2013 13:20
by admin
grindax wrote:Very nice. It's comforting to know that that kind of precision is now there if needed. Presumably sorting by timestamp will always take the milliseconds into account even when they're not currently being displayed in the date columns?
Sure! Even down to the 100-nanoseconds! Sorting by time is always maximally precise, independently of the display. Not my merit but built into the Windows time sorting API.
Re: Msecs "reloaded"
Posted: 07 Jun 2013 13:23
by Marco
Re: Msecs "reloaded"
Posted: 07 Jun 2013 17:21
by Marco
Could datediff() or compare() support milliseconds too? Actually, just one of those would be enough. (I have a little script that picks the three dates of a file and then sets all them to the earliest one. Yep, I'm that paranoid

)
PS: I notice that the recent addition of UTC times and milliseconds can introduce new usage possibilities and syntax pitfalls in functions handling dates. I'll do some tests, if you think it's necessary/worth. One for sure tho, timestamp() seems to handle every combination smoothly.
Re: Msecs "reloaded"
Posted: 07 Jun 2013 17:59
by binocular222
Any idea for usage of this new feature?
Re: Msecs "reloaded"
Posted: 07 Jun 2013 18:21
by Marco
I could think of softwares or particular workflows (log files, tech systems) that write many files in a row, each one with a different name but not necessarily in alphabetic order (I mean, the chronological order of creation is different from the alphabetic order of the whole set of files).
If the computer is quite fast those files can result being written at the same instant. With a millisecond resolution you can differentiate.
Re: Msecs "reloaded"
Posted: 07 Jun 2013 18:21
by admin
Marco wrote:Could datediff() or compare() support milliseconds too? Actually, just one of those would be enough. (I have a little script that picks the three dates of a file and then sets all them to the earliest one. Yep, I'm that paranoid

)
PS: I notice that the recent addition of UTC times and milliseconds can introduce new usage possibilities and syntax pitfalls in functions handling dates. I'll do some tests, if you think it's necessary/worth. One for sure tho, timestamp() seems to handle every combination smoothly.
Yes, I think I can do that.
Yes, go ahead. But wait for the next beta. I fixed some glitches... (and added some complications).
Re: Msecs "reloaded"
Posted: 08 Jun 2013 00:19
by PeterH
Beta doc of 12.40.0302 says:
Code: Select all
+ SC report: Now milliseconds are supported. Examples:
echo now("fff");
echo now("yyyy-mm-dd hh:nn:ss.fff");
It seems this isn't SC report

Re: Msecs "reloaded"
Posted: 08 Jun 2013 08:13
by admin

tnx
Re: Msecs "reloaded"
Posted: 08 Jun 2013 09:38
by admin
FYI, this little script proves that the modified time is precise down to the millisecond (tested under XP; "Show Milliseconds" = ON to compare the timestamp with the "Now" time). Run it in any temp folder:
Code: Select all
// modified time test
writefile("test.txt", "test");
echo now("yyyy-mm-dd hh:nn:ss.fff");
BTW, anybody here interested in
microsecond time stamping?
