Subversion Repositories shark

Rev

Blame | Last modification | View Log | RSS feed

/*
Step 1b: Generation of the Shape of the hard periodic load
---------------------------------------------------------
This is a variant for the step1. It simply produces a constant periodic
load.
*/


#include <stdio.h>
#include <stdlib.h>

#define MAX_BANDWIDTH 0xFFFFFFFF

int x;
int x_total[1000], x_B[1000];

int main()
{
  unsigned length;
  unsigned i;

  scanf("%d",&length);

  srand(time(0));

  printf("2\n");

  i=(MAX_BANDWIDTH/100)*(rand()%90);

  printf("0 %u\n",i);
  printf("%u 0\n",length);

  fprintf(stderr,"Bandwidth=%f",((double)i)/MAX_BANDWIDTH);
  return 0;
}