Add get_time_steps().

This commit is contained in:
Gerhard Hoffmann 2024-01-22 14:46:40 +01:00
parent d7757773bd
commit 0671a6dde6
2 changed files with 4 additions and 4 deletions

View File

@ -111,8 +111,7 @@ int CALCULATE_LIBRARY_API get_zone_nr(int zone = -1);
int CALCULATE_LIBRARY_API compute_next_timestep(parking_tariff_t *tariff, int currentTimeMinutes, int UpDown);
class Calculator;
Calculator CALCULATE_LIBRARY_API *get_calculator();
QList<int> CALCULATE_LIBRARY_API get_time_steps(Configuration *cfg, qint64 startInMinutes = QDateTime::currentSecsSinceEpoch() / 60);
CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket( // deprecated
parking_tariff_t *tariff,

View File

@ -8,11 +8,12 @@
#include <QFileInfo>
#include <QDateTime>
#include <QDebug>
#include <QList>
static Calculator calculator;
Calculator CALCULATE_LIBRARY_API *get_calculator() {
return &calculator;
QList<int> CALCULATE_LIBRARY_API get_time_steps(Configuration *cfg, qint64 startInMinutes) {
return calculator.GetTimeSteps(cfg, startInMinutes);
}
int CALCULATE_LIBRARY_API get_zone_nr(int zone)