Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/media/webrtc/common/time_profiling/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  timecard.h

  Sprache: C
 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


#ifndef timecard_h_
#define timecard_h_

#include "prtime.h"

#ifdef __cplusplus
extern "C" {
#endif

#define STAMP_TIMECARD(card, event)                                      \
  do {                                                                   \
    if (card) {                                                          \
      stamp_timecard((card), (event), __FILE__, __LINE__, __FUNCTION__); \
    }                                                                    \
  } while (0)

#define TIMECARD_INITIAL_TABLE_SIZE 16

/*
 * The "const char *" members of this structure point to static strings.
 * We do not own them, and should not attempt to deallocate them.
 */


typedef struct {
  PRTime timestamp;
  const char* event;
  const char* file;
  unsigned int line;
  const char* function;
} TimecardEntry;

typedef struct Timecard {
  size_t curr_entry;
  size_t entries_allocated;
  TimecardEntry* entries;
  PRTime start_time;
} Timecard;

/**
 * Creates a new Timecard structure for tracking events.
 */

Timecard* create_timecard();

/**
 * Frees the memory associated with a timecard. After returning, the
 * timecard pointed to by tc is no longer valid.
 */

void destroy_timecard(Timecard* tc);

/**
 * Records a new event in the indicated timecard. This should not be
 * called directly; code should instead use the STAMP_TIMECARD macro,
 * above.
 */

void stamp_timecard(Timecard* tc, const char* event, const char* file,
                    unsigned int line, const char* function);

/**
 * Formats and outputs the contents of a timecard onto stdout.
 */

void print_timecard(Timecard* tc);

#ifdef __cplusplus
}
#endif

#endif

Messung V0.5 in Prozent
C=94 H=84 G=88

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.