This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cmath> | |
//! One kibibyte unit size (see http://en.wikipedia.org/wiki/Kibibyte) | |
const size_t KiB = 1024; | |
//! One mebibyte unit size (see http://en.wikipedia.org/wiki/Mebibyte) | |
const size_t MiB = 1024*1024; | |
//! Convert timeval structure to a double | |
double toDbl( struct timeval& t ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef PRINTHEX_H | |
#define PRINTHEX_H | |
#include <stdio.h> | |
// Display data in hexadecimal | |
inline void printHex( const void* data, size_t len, const char* margin ) | |
{ | |
if( len == 0 ) | |
{ |
NewerOlder