Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anyone written code to replace SYS(2015)?
Message
From
27/09/2006 09:39:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
27/09/2006 09:36:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01157093
Message ID:
01157468
Views:
20
It's not needed. sys(2015) is guaranteed to be unique even if called within same millisecond.
However result is not unique in a multiuser environment.
Cetin

>Randall,
>
>if you are afraid of getting the same sys(2015) for calling it inside the millisecond, simply add a few lines tou your uniqueID() function to skip this chance:
>
>
>	lcUniqueID = sys(2015)
>	do while lcUniqueID == sys(2015)
>	endDo
>
>	return lcUniqueID
>
>
>
>it won't add a noticiable delay when generating thousands of IDs and it's safer.
>
>>Hi again, Dragan. Good to hear from you again, bro.
>>
>>>Look at message #1156037 - just use milliseconds instead of seconds. You wouldn't
>>>get the exact same result, but an equivalent of a timestamp-as-string. If millisecond
>>>resolution isn't good enough, then, well, find something more precise.
>>
>>Looking...Okay. Looks like something I can translate to PHP.
>>
>>Thanks a bunch, Dragan.
>>
>>Randall
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform