// counter.cc // Kenneth J. Goldman 12/26/94 // T. Paul McCartney 12/30/96 (converted) // // This module has a single read-write integer presentation variable. // It increments the value once per second until the counter hits 1800. // Therefore, it will run for about 30 minutes starting from 0. #include "PG.hh" int main() { PGint c = 0; PG::initialize("COUNTER"); c.publish("c", PG::READ | PG::WRITE); while (c < 1800) { PG::sleep(1); c = c + 1; } PG::terminate(); }