DDMessageIndex.h (897B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim:set ts=2 sw=2 sts=2 et cindent: */ 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/. */ 6 7 #ifndef DDMessageIndex_h_ 8 #define DDMessageIndex_h_ 9 10 #include "RollingNumber.h" 11 12 namespace mozilla { 13 14 // Type used to uniquely identify and sort log messages. 15 // We assume that a given media element won't live for more than the time taken 16 // to log 2^31 messages (per process); for 10,000 messages per seconds, that's 17 // about 2.5 days 18 using DDMessageIndex = RollingNumber<uint32_t>; 19 20 // Printf string constant to use when printing a DDMessageIndex, e.g.: 21 // `printf("index=%" PRImi, index);` 22 #define PRImi PRIu32 23 24 } // namespace mozilla 25 26 #endif // DDMessageIndex_h_