#include "../include/Sim2OS.h"

namespace environment {
namespace sim2os {

  void * Sim2OS::service_clock (void)
  {
    if (have_all_arguments(0) == false)
      {
	std::cerr << "<" << name << "> Usage : clock_t clock();" << std::endl;
	return NULL;
      }
    
    void * result = (void *) nb_cycle;
    error         = 0;
    
    std::cout << "\n\t***** service : clock         *****" << std::endl;
    std::cout << "\tresult    : " << static_cast<int32_t>(reinterpret_cast<int64_t>(result)) << std::endl;
    std::cout << "\terrno     : " << error << std::endl;
    
    return      result;
  }

};
};
