mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
about:startup - PR_IntervalNow is kinda dumb. It makes no special attempt to be monotonic like the docs say, and additionally there's no way to equate it back to a real timestamp (which the docs do imply). Using PR_Now instead.
This commit is contained in:
parent
2d1ef93cea
commit
ec86a6d7ae
@ -4,4 +4,4 @@ var Ci = Components.interfaces;
|
||||
var runtime = Cc["@mozilla.org/xre/runtime;1"]
|
||||
.getService(Ci.nsIXULRuntime);
|
||||
var started = document.getElementById("started");
|
||||
started.textContent = runtime.startupTimestamp
|
||||
started.textContent = new Date(runtime.startupTimestamp/1000) +" ("+ runtime.startupTimestamp +")";
|
||||
|
@ -73,7 +73,7 @@ ScopedAppData::ScopedAppData(const nsXREAppData* aAppData)
|
||||
this->size = aAppData->size;
|
||||
|
||||
if (aAppData->size > offsetof(nsXREAppData, startupTimestamp)) {
|
||||
this->startupTimestamp = PR_IntervalNow();
|
||||
this->startupTimestamp = PR_Now();
|
||||
}
|
||||
|
||||
SetAllocatedString(this->vendor, aAppData->vendor);
|
||||
|
@ -806,13 +806,13 @@ nsXULAppInfo::InvalidateCachesOnRestart()
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long launchTimestamp; */
|
||||
NS_IMETHODIMP nsXULAppInfo::GetLaunchTimestamp(PRUint32 *aTimestamp)
|
||||
NS_IMETHODIMP nsXULAppInfo::GetLaunchTimestamp(PRUint64 *aTimestamp)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* readonly attribute unsigned long startupTimestamp; */
|
||||
NS_IMETHODIMP nsXULAppInfo::GetStartupTimestamp(PRUint32 *aTimestamp)
|
||||
NS_IMETHODIMP nsXULAppInfo::GetStartupTimestamp(PRUint64 *aTimestamp)
|
||||
{
|
||||
*aTimestamp = gAppData->startupTimestamp;
|
||||
return NS_OK;
|
||||
|
@ -155,7 +155,7 @@ struct nsXREAppData
|
||||
/**
|
||||
*
|
||||
*/
|
||||
PRIntervalTime startupTimestamp;
|
||||
PRTime startupTimestamp;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -108,6 +108,6 @@ interface nsIXULRuntime : nsISupports
|
||||
*/
|
||||
void invalidateCachesOnRestart();
|
||||
|
||||
readonly attribute unsigned long launchTimestamp;
|
||||
readonly attribute unsigned long startupTimestamp;
|
||||
readonly attribute unsigned long long launchTimestamp;
|
||||
readonly attribute unsigned long long startupTimestamp;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user