libsysprof-analyze: remove pre-calculated time offsets

These are rather annoying because we want to avoid inflating the objects
in most cases anyway.
This commit is contained in:
Christian Hergert
2023-06-16 13:10:41 -07:00
parent 87e28a6062
commit 10b2ecd299
4 changed files with 16 additions and 57 deletions

View File

@ -23,6 +23,17 @@
#include "sysprof-document-frame-private.h"
#include "sysprof-document-mark.h"
struct _SysprofDocumentMark
{
SysprofDocumentFrame parent_instance;
};
struct _SysprofDocumentMarkClass
{
SysprofDocumentFrameClass parent_class;
};
enum {
PROP_0,
PROP_DURATION,
@ -149,29 +160,3 @@ sysprof_document_mark_get_message (SysprofDocumentMark *self)
return SYSPROF_DOCUMENT_FRAME_CSTRING (self, mark->message);
}
/**
* sysprof_document_mark_get_time_fraction:
* @self: a #SysprofDocumentMark
* @begin_fraction: (out) (nullable): a location for the begin
* time as a fraction
* @end_fraction: (out) (nullable): a location for the end
* time as a fraction
*
* Gets the begin/end time of the mark as a fraction between 0 and 1.
*
* 0 is the beginning of the capture, 1 is the end of the capture.
*/
void
sysprof_document_mark_get_time_fraction (SysprofDocumentMark *self,
double *begin_fraction,
double *end_fraction)
{
g_return_if_fail (SYSPROF_IS_DOCUMENT_MARK (self));
if (begin_fraction)
*begin_fraction = self->begin_fraction;
if (end_fraction)
*end_fraction = self->end_fraction;
}