Why is this feature important to you? How would it benefit the community?
Currently the system clock llGetGMTclock( ) provides one second resolution.
A higher resolution clock would allow a precise coordination of object movement and animation in a way that doesn't require a central point of control. This method will reduce server load by eliminating message passing for coordinating precise object location and orientation. {}"all of us, at this precise tick, know to perform this action"{}.
Best of all, this method works grid-wide.
A 100x clock compensation method could be used, but it's cumbersome, subject to drift with server time dilution and adds complexity to an already time-critical event loop.
Original Jira Fields
| Field | Value |
| ------------- | ------------- |
| Issue | BUG-233706 |
| Summary | Function that returns a dependable 1/100th second clock |
| Type | New Feature Request |
| Priority | Unset |
| Status | Accepted |
| Resolution | Unresolved |
| Created at | 2023-04-04T00:43:47Z |
| Updated at | 2023-04-05T18:15:56Z |
```
{
'Build Id': 'unset',
'Business Unit': ['Platform'],
'Date of First Response': '2023-04-05T13:15:56.736-0500',
'How would you like the feature to work?': 'float llFclock();\r\nfloat llIclock();\r\nReturns a grid-wide accurate 1/100th of a second clock as a float and/or int.\r\n\r\n',
'ReOpened Count': 0.0,
'Severity': 'Unset',
'Target Viewer Version': 'viewer-development',
'Why is this feature important to you? How would it benefit the community?': 'Currently the system clock llGetGMTclock( ) has one second resolution.\r\nA higher resolution clock is needed to coordinate object movement and animation in a way that doesn\'t require a central point of coordination:\r\n"all of us, at this precise tick, know to perform this action"\r\n\r\nA clock compensation method could be used, but it\'s cumbersome, subject to drift with server time dilution and adds complexity to an already time-critical event loop. The servers already know this value and could pass it when requested.\r\n\r\nThe clock\'s origin from 0 doesn\'t matter because the need is for relative coordination, but the max needs to be known to handle wrap-around correctly so things don\'t jump all over the grid at 0 rollover.',
}
```
How would you like the feature to work?
float ll_fclock(float modulo); float ll_iclock(int modulo); Returns a grid-wide accurate 1/100th of a second clock as a float and/or int.
(either float or int is fine, but both makes for smaller/faster code)
The clock rolls over to 0 at modulo.
// function that returns the same path position
// everywhere on the grid, for any point in time
vector circle_path(float freq, float amplitude) {
vector pos = <0.0,0.0,0.0>;
pos.x = llSin(ll_fclock(TWO_PI) * freq) * amplitude;
pos.y = llCos(ll_fclock(TWO_PI) * freq) * amplitude;
return(pos);
}
Why is this feature important to you? How would it benefit the community?
Currently the system clock llGetGMTclock( ) provides one second resolution.
A higher resolution clock would allow a precise coordination of object movement and animation in a way that doesn't require a central point of control. This method will reduce server load by eliminating message passing for coordinating precise object location and orientation. {}"all of us, at this precise tick, know to perform this action"{}.
Best of all, this method works grid-wide.
A 100x clock compensation method could be used, but it's cumbersome, subject to drift with server time dilution and adds complexity to an already time-critical event loop.
Original Jira Fields
| Field | Value | | ------------- | ------------- | | Issue | BUG-233706 | | Summary | Function that returns a dependable 1/100th second clock | | Type | New Feature Request | | Priority | Unset | | Status | Accepted | | Resolution | Unresolved | | Created at | 2023-04-04T00:43:47Z | | Updated at | 2023-04-05T18:15:56Z | ``` { 'Build Id': 'unset', 'Business Unit': ['Platform'], 'Date of First Response': '2023-04-05T13:15:56.736-0500', 'How would you like the feature to work?': 'float llFclock();\r\nfloat llIclock();\r\nReturns a grid-wide accurate 1/100th of a second clock as a float and/or int.\r\n\r\n', 'ReOpened Count': 0.0, 'Severity': 'Unset', 'Target Viewer Version': 'viewer-development', 'Why is this feature important to you? How would it benefit the community?': 'Currently the system clock llGetGMTclock( ) has one second resolution.\r\nA higher resolution clock is needed to coordinate object movement and animation in a way that doesn\'t require a central point of coordination:\r\n"all of us, at this precise tick, know to perform this action"\r\n\r\nA clock compensation method could be used, but it\'s cumbersome, subject to drift with server time dilution and adds complexity to an already time-critical event loop. The servers already know this value and could pass it when requested.\r\n\r\nThe clock\'s origin from 0 doesn\'t matter because the need is for relative coordination, but the max needs to be known to handle wrap-around correctly so things don\'t jump all over the grid at 0 rollover.', } ```