+static void
+printSample(rtsBool beginSample, StgDouble sampleValue)
+{
+ StgDouble fractionalPart, integralPart;
+ fractionalPart = modf(sampleValue, &integralPart);
+ fprintf(hp_file, "%s %d.%02d\n",
+ (beginSample ? "BEGIN_SAMPLE" : "END_SAMPLE"),
+ (int)integralPart, (int)(fractionalPart * 100 + 0.5));
+}
+