зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
b7b8162d74
Коммит
5abbf16f2e
|
@ -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;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче