code: private void set_time()
  	{
  		if (date == true)
  		{		
  			Date d = new Date();
  			
  			long nb_millisec = d.getTime();
  	
  			when.tv_sec = (int)(nb_millisec / 1000);
  			when.tv_usec = (int)((nb_millisec - (when.tv_sec * 1000)) * 1000);
  			when.tv_nsec = 0;
  		}
  	}
docs: --------------------------------------------------------------------------