1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_performancemeasure_h___
8 #define mozilla_dom_performancemeasure_h___
10 #include "mozilla/dom/PerformanceEntry.h"
15 // http://www.w3.org/TR/user-timing/#performancemeasure
16 class PerformanceMeasure final
: public PerformanceEntry
{
18 PerformanceMeasure(nsISupports
* aParent
, const nsAString
& aName
,
19 DOMHighResTimeStamp aStartTime
,
20 DOMHighResTimeStamp aEndTime
);
22 virtual JSObject
* WrapObject(JSContext
* aCx
,
23 JS::Handle
<JSObject
*> aGivenProto
) override
;
25 virtual DOMHighResTimeStamp
StartTime() const override
{ return mStartTime
; }
27 virtual DOMHighResTimeStamp
Duration() const override
{ return mDuration
; }
29 size_t SizeOfIncludingThis(
30 mozilla::MallocSizeOf aMallocSizeOf
) const override
;
33 virtual ~PerformanceMeasure();
34 DOMHighResTimeStamp mStartTime
;
35 DOMHighResTimeStamp mDuration
;
39 } // namespace mozilla
41 #endif /* mozilla_dom_performancemeasure_h___ */