|
|
@ -737,15 +737,15 @@ void stats_updatedisp(struct DEXstats_disp *disp,int32_t seconds,double price,do |
|
|
|
void stats_dispprices(struct DEXstats_disp *prices,int32_t leftdatenum,int32_t numdates,struct DEXstats_datenuminfo *date,char *dest,int32_t current_daysecond) |
|
|
|
{ |
|
|
|
int32_t i,j,seconds,hour,offset,delta,datenum = date->datenum; struct DEXstats_pairinfo *pair; struct DEXstats_pricepoint *ptr; uint32_t timestamp; |
|
|
|
printf("add datenum.%d vs leftdatenum.%d numdates.%d\n",datenum,leftdatenum,numdates); |
|
|
|
if ( datenum >= leftdatenum-1 && datenum <= leftdatenum+numdates ) |
|
|
|
{ |
|
|
|
offset = datenum - leftdatenum; |
|
|
|
printf("offset.%d\n",offset); |
|
|
|
printf("add datenum.%d vs leftdatenum.%d numdates.%d offset.%d numpairs.%d\n",datenum,leftdatenum,numdates,offset,date->numpairs); |
|
|
|
for (i=0; i<date->numpairs; i++) |
|
|
|
if ( strcmp(dest,date->pairs[i].dest) == 0 ) |
|
|
|
{ |
|
|
|
pair = &date->pairs[i]; |
|
|
|
printf("found dest.(%s) numprices.%d\n",dest,pair->numprices); |
|
|
|
for (j=0; j<pair->numprices; j++) |
|
|
|
{ |
|
|
|
ptr = &pair->prices[j]; |
|
|
|