removed useless _ folders

This commit is contained in:
Fred Beckhusen
2015-08-09 16:54:31 -05:00
parent fde850293c
commit 948a44dfba
5204 changed files with 2425579 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
<Solution name="Millisecond_Time">
<Project name="Millisecond_Time" path="Millisecond_Time\Millisecond_Time.prj" active="true"/>
</Solution>

View File

@@ -0,0 +1,8 @@
<Project name="Millisecond_Time" guid="D7F8E602-6C00-1014-B904-200204C60A89">
<Object name="Object" guid="D7F8E6FE-6C00-1014-B904-200204C60A89">
<Script name="Millisecond_Time_1.lsl" guid="D7F90BB3-6C00-1014-B904-200204C60A89">
</Script>
<Script name="Millisecond_Time_2.lsl" guid="D7F91F2D-6C00-1014-B904-200204C60A89">
</Script>
</Object>
</Project>

View File

@@ -0,0 +1,29 @@
// :CATEGORY:Clock
// :NAME:Millisecond_Time
// :AUTHOR:Minsk Oud
// :CREATED:2010-01-10 05:20:56.000
// :EDITED:2013-09-18 15:38:57
// :ID:513
// :NUM:694
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// A collection of time utility functions, to try and make sub-second and timezone handling easier.
//
// First a timezone-aware cousin of llGetGMTclock:
// :CODE:
// By Christopher Wolfe (SL name "Minsk Oud").
// This script is in the public domain.
//
// A version of llGetGMTclock() with timezone support, using the
// offset in seconds. Some useful offsets:
//
// EST = -5 * 3600 = -18000

View File

@@ -0,0 +1,112 @@
// :CATEGORY:Clock
// :NAME:Millisecond_Time
// :AUTHOR:Minsk Oud
// :CREATED:2010-01-10 05:20:56.000
// :EDITED:2013-09-18 15:38:57
// :ID:513
// :NUM:695
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// The remainder of these functions deal with time of day as *milliseconds* since midnight. As this format would overflow every ~24 days, it must not be used to represent date or elapsed time information (unless you are Microsoft and like your servers crashing).
// :CODE:
// By Christopher Wolfe (SL name "Minsk Oud").
// This script is in the public domain.
// Gets the number of milliseconds since midnight UTC.
integer GetGMTmsclock()
{
string stamp = llGetTimestamp();
return
(integer) llGetSubString(stamp, 11, 12) * 3600000 +
(integer) llGetSubString(stamp, 14, 15) * 60000 +
llRound((float) llGetSubString(stamp, 17, -2) * 1000.0);
}
// Gets the number of milliseconds since midnight in the specified
// timezone, using the offset in milliseconds. Some useful offsets:
//
// EST = -5 * 3600000 = -18000000
// PST = -8 * 3600000 = -28800000
//
integer GetTZmsclock(integer offset)
{
if (offset < 0) offset += 86400000;
integer time = (integer) GetGMTmsclock() + offset;
if (time >= 86400000) time -= 86400000;
return time;
}
//
// Formats a number of milliseconds since midnight as human readable
// time of day.
//
// time: Number of milliseconds since midnight. Must be greater than
// or equal to zero and strictly less than 86400000.
//
// military: If TRUE, output in 24-hour (or military) time.
// If FALSE, output in 12-hour time with AM/PM indicator.
//
// second_decimals: Number of decimal digits to display for seconds.
// Zero will remove the decimal point, greater than three
// is useless.
//
string FormatTime(integer time, integer military, integer second_decimals)
{
// Uncomment this to ensure time is within the correct range
//
// while (time < 0) time += 86400000;
// while (time >= 86400000) time -= 86400000;
//
integer hour = time / 3600000; time -= hour * 3600000;